Customised UI Macro for a Record Producer

raahijonathan
Tera Contributor

I need a UI Macro for Variable editor. I have a customised table where there are 100+ fields. When the user submits the form each and every question is getting populated in the Variable editor.

I just need a Macro where only the user filled values should get populated. Can someone help me with the script.

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Jonathan,



Can you explain it in more detail?



Regards


Ankur


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

Hello Ankur,



Thank you for the response.



-> We have created a Record Producer in which the variables are mapped into a customised Table.


-> Now we have got a new requirement that we need to create 150 new variables into the Record producer.


-> Which means we have to create 150 new columns in the Table for storing the data.


-> The new variables we have added on the form will get populated according to the user selection of answers. (According to UI policies).


-> Which means many variables will be not filled by the user, as they are not their sections.


-> Now, The problem is after submitting the form, every variable is visible in the Variable editor, even the non-filled fields.


-> This is because I have set the default Macro in the Formatter used.


-> Now, I need a Macro which will iterate through the record and populate only the variables answered by the User in the Variable Editor.



Please help me with this Macro script.


Can I know the solution for this Ankur?