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

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)?

I was not doing that before. but doing so resolved the issue:)

In addition, do you know how we can use Multi row variable set not allowing duplicate values? Lets say i have reference field in my multi row variable set, i dont want two times the user adds the same value in the multi row variable set? i can do json duplicate check in the script, but any idea how we can do it in the form itself

I believe you can do an onChange Client script on the reference field. When the user selects a new value then previous values selected can be checked and if a match is found alert the user then clear the selection.