Changes

Jump to: navigation, search

Updating Store Value System Variables with Pandora

1,646 bytes added, 00:41, 23 August 2012
Created page with ' When updating a Store Value - System Variable custom field using Pandora you have 2 options: 1) Populate the actual value with Pandora 2) Prompt the SmartSimple server to …'


When updating a [[Store Value - System Variable]] custom field using Pandora you have 2 options:

1) Populate the actual value with Pandora
2) Prompt the SmartSimple server to calculate the value based on the field configuration


For the first option, the values are added directly by the javascript code, just like any other custom field that stores data. To update custom field with ID 1234713 with the text "Store This Value" the following code would be used:

rset=new ssRecordSet(null);
rset.addfieldnames("eventid,cf_1234713");
var idx=rset.getnewrecnumber();

rset.addfieldvaluebyname(idx,'eventid',eventid);
rset.addfieldvaluebyname(idx,'cf_1234713','Store This Value');

result=level23_update(false ,'',100022,2,rset);


For the second option you add the letter "v" in front of the fieldid. The value that you pass will be ignored, and the system will process the variables in the configuration of the [[Store Value - System Variable]] custom field to determine what value will be stored.

For example:
rset=new ssRecordSet(null);
rset.addfieldnames("eventid,cf_v1234713");
var idx=rset.getnewrecnumber();

rset.addfieldvaluebyname(idx,'eventid',eventid);
rset.addfieldvaluebyname(idx,'cf_v1234713','ignore');

result=level23_update(false ,'',100022,2,rset);




==See Also==
* [[Custom Field Type: Store Values – System Variables]]
* [[Populating Auto Number Custom Fields with Pandora]]


[[Category:Pandora]]
0
edits

Navigation menu