Retrieving User Defined Tables

Get single value from User Defined Table

To retrieve data from user defined table use this function

To retrieve single value data from a user defined table you must provide both mainKey and secondaryKey parameters.

Example:

pepperi.api.userDefinedTables.get(
{ table:"myTable",mainKey:"Item123", secondaryKey:"Categorgy124" });

Returns:

{"success":true,"value":"1"}

Get list of values from User Defined Table

THIS FUNCTION EXISTS ONLY FROM CPI 15.70

To retrieve list of values from a user defined table you must provide at least tableName while mainKey and secondaryKey are optional.

currentAccountScope default value is true , in case you want to load the entire data from disk set it to false.

Example:

pepperi.api.userDefinedTables.getList(
{ table:"myTable",mainKey:"Item123", currentAccountScope: true});

Returns:

{ success :true, objects: [
{ mainKey: "ABCD12" , secondaryKey : "GFT4" , value: "23.5" },
{ mainKey : ABCD12 , secondaryKey : "GFT5" , value: "5656.5" }
] }