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:
1
pepperi.api.userDefinedTables.get(
2
{ table:"myTable",mainKey:"Item123", secondaryKey:"Categorgy124" });
Copied!
Returns:
1
{"success":true,"value":"1"}
Copied!

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:
1
pepperi.api.userDefinedTables.getList(
2
{ table:"myTable",mainKey:"Item123", currentAccountScope: true});
Copied!
Returns:
1
{ success :true, objects: [
2
{ mainKey: "ABCD12" , secondaryKey : "GFT4" , value: "23.5" },
3
{ mainKey : ABCD12 , secondaryKey : "GFT5" , value: "5656.5" }
4
] }
Copied!
Last modified 2yr ago