Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Pre populate a variable in a multirow based on a variable outside

mipalm
Tera Guru

Hi, 

I have a variable inside a multirow variable set named 'user type' i have a similar variable in the form outside of the multirow. I want to make it so, once i select the user_type outside of the multirow, and once i open the mrv this variable is auto-populated with the previous response. Any idea how i can do this?

 

 

Thanks,

 

Miguel Santos Palmeira

1 ACCEPTED SOLUTION

Sonam_Tiwari
Kilo Sage

Hi @mipalm ,

 

You can add a onLoad client script in the mvrs as

 

function onLoad() {
    //Type appropriate comment here, and begin script below
    var option = g_service_catalog.parent.getValue("user_type")  // user_type is the variable name from the catalog item
    g_form.setValue('user_type1', option); // user_type1 is the variable on the mvrs.
}

 

 

Not clear with the variable type from the question but you can apply the same logic to other type with tweaking it a bit if required.

I have tried with select box.

 

sonamtiwari_0-1707495760012.png

 

 

 

 

Consider indicating the response as helpful and marking it as correct if it meets your needs.

View solution in original post

2 REPLIES 2

Sonam_Tiwari
Kilo Sage

Hi @mipalm ,

 

You can add a onLoad client script in the mvrs as

 

function onLoad() {
    //Type appropriate comment here, and begin script below
    var option = g_service_catalog.parent.getValue("user_type")  // user_type is the variable name from the catalog item
    g_form.setValue('user_type1', option); // user_type1 is the variable on the mvrs.
}

 

 

Not clear with the variable type from the question but you can apply the same logic to other type with tweaking it a bit if required.

I have tried with select box.

 

sonamtiwari_0-1707495760012.png

 

 

 

 

Consider indicating the response as helpful and marking it as correct if it meets your needs.

Hi, 

This implementation worked! 

Thank you for the quick reply