Monday, December 5, 2016

const in js

  1. new const feature

    in the past there was no real constants in js, everything could be overwritten (even sometimes keywords)
    in ECMAScript6 this has been alleviated

    const in JS means the object can be assigned once
    if you try this

    const i = 45
    i= 0
    console.log(I)



    this will fail
    SyntaxError: Identifier 'i' has already been declared

    with objects member can be assigned afterwards


    const obj2 = {}
    obj2.a ="gg"



    but subsequent
    obj2 = {}
    will fail

    even with const, the only way to have a readonly member of an object is

    var testobj = {};
    Object.defineProperty( testobj , "pseudoconst",
    {
    value: 3,

    writable: false,

    enumerable: true,

    configurable: true
    });


    testobj.pseudoconst
    3
    testobj.pseudoconst = 5//this wont raise an error but wont change the value either
    5
    testobj.pseudoconst
    3

let in js

  1. as Douglas Crockford has said, the worst feature of JavaScript is global variables.
    This has been alleviated greatly by block scoped variables

    consider the following


    var test ="herman"

    {
    test ="boris";
    console.log(test)
    }
    console.log(test)

    or


    var test ="herman"

    {
    var test ="boris";
    console.log(test)
    }
    console.log(test)

    the result will be


    boris
    boris

    However, with the new let keyword

    var test ="herman"

    {
    let test ="boris";
    console.log(test)
    }
    console.log(test)

    the results are now
    boris
    herman

Tuesday, November 22, 2016

Factless Fact Table

here

Access and SharePoint Interactions


GetLookupDisplayValues


When you create with VBA an attached SharePoint list in access, you are given the option of getting lookup display values (if you attach manually the value will be False).
GetLookupDisplayValues
Optional
Variant
Specifies whether to transfer display values for Lookup fields instead of the ID used to perform the lookup.
This setting will determine if SharePoint Created by and Modified by columns are lookups which will use UserInfo lookup table or plain text values (e.g. herby ).
Strangely enough, this will not help for user defined columns (such as escalated to)
Likewise, if querying “modified by”, the query window is acting like a lookup by being in drop down
And raises the following error

Number of Rows Limit



This will happen when GetLookupDisplayValues = true
If this is the case - set  cache settings  

Number of lookups limit


SharePoint has a limit of 12 lookup columns.
This bubbles up to Access

Non-Solutions to deal with this in Access
·        Query less columns through a query object
·        Set GetLookupDisplayValues to true
·        changing cache options

Solutions to deal with this in Access

·        Create a view

For example, in the “herby” list I have created a view called herby1”.
With this you gain not including Microsoft lookup columns like “Taxonomy Catch All Column”
When you connect to SharePoint, use view id (this image is from my test platform)
 
So you can now connect to the list

Thursday, November 17, 2016

UDF in access-sql

must have a type "as String etc.". otherwise you will get internal database engine error

Thursday, November 10, 2016

Lookup columns in sharepoint to access

if allow multiple values the ado.field type will be 109(complex text) if not then it's a regular 10 (text)


many bugs

Wednesday, November 9, 2016

house analogy

build one house that fulfills 100 people's design requests - that's software