The CreatorCon Call for Content is officially open! Get started here.

Passing Json object from Client script to Script Include

kailashthiyagar
Kilo Guru

I m passing the Multi row variable set, from the client script to script include and trying to loop through it, it says "no default value for the object"

This is the part of the code and "mrv_altirisJob" is the multi row set variable which i m passing from client script to script include. in addition, if i add a log message to print "mrv_altirisJob" , it says [object,object] ..

try{
for(var i=0;i<mrv_altirisJob.length; i++){
var appSysID=mrv_altirisJob[i];

1 ACCEPTED SOLUTION

DScroggins
Kilo Sage

Hi,

 

Are you passing the object as a string i.e JSON.stringify(obj) and then parsing it back to an object i.e JSON.parse(obj)?

View solution in original post

7 REPLIES 7

Thanks.

One last question. This is not related to Multi row variable set. Lets assume, i have 2 reference fields, based on what i select in my first reference field, i have to populate the second reference field source(not the value).

 

I can do it using the "Advance Reference qualifier" but i want to do it using client script, since if i m getting only record from my script include, i want to directly set the field value, if not i want to set the source for the reference field.

I don't think that you can set the reference field source using the client script as that is server side configured. Client script can only set the field value but the field source needs to be pre-configured in the variable configuration. One possible solution (depending on how many source table options you have) is to create reference variables for those specific tables then use the client script or UI Policys to show/hide the appropriate fields based on the user input.