How to populate Requestor Details in variables of MRVS?

rkreddy
Giga Expert

Hi All,

Hope everyone is doing good.

I am working on a catalog form with Variables,

Name (reference to User table), Department, Work Location, Telephone, Email. When value changes in Name variable, all the other variables get populated automatically if the user in Name variable has that values exist. If not, we are allowing users to manually enter values in Department, work location, telephone, email variables.

We have a MRVS with the same variables as mentioned above.

Now, We have a checkbox variable on the same form with name "Self". When user checks it to true, all the values in the Name, Department, work location, telephone, email should be copied to variables in MRVS. If he unchecks, the values should get cleared (only the row should get deleted which is populated when the variable is checked). This should work on change of both Name and Self variables.

Thank you.

1 ACCEPTED SOLUTION

@rkreddy 

Done and working fine in native

please check below output

find_real_file.png

Please mark my response as correct and close the question.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

58 REPLIES 58

Hi @Ankur Bawiskar ,

Updated like above, parser is showing [object Object] again. And all the values in MRVS are getting deleted.

Also tried by changing to var parser = JSON.parse(JSON.stringify(details1));

This time the parser is showing values, but the rows are not getting deleted.

Thank you.

Sorry but it becomes really difficult to understand as we don't have access to the instance.

Can you replicate this in your PDI and share what exactly is requirement

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Sure @Ankur Bawiskar ,

I will replicate and update you.

Hi @Ankur Bawiskar ,

I have replicated the catalog form in PDI. And I haven't written any scripts to make it clear for you to understand from scratch.

Requirement is: 

I have 2 variables, Requestor (reference), self (checkbox) and MRVS (with variables, Attendee name, Email Address, Department, Title) on the catalog form.

When user clicks on Self to true, the details of User in requestor field (like name, email address , department and title) should get populated in respective variables of MRVS. And users also have privilege to enter values manually into MRVS by clicking on ADD button of MRVS. 

So, when user set Self check box to false, the values that were auto populated in MRVS should only get deleted. Manually entered values only should present.

I will send my credentials to you in Mail, could you please drop mail to rkreddygudise@gmail.com

Thank you.

Please drop me the details

will take a look tomorrow

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader