Empty values for macro in variable editor

harshvardhan_11
Giga Expert

Hi,

I have created a UI macro, having an input field, which I am using in a variable in record producer.

After submitting the item, and checking record created. The variable editor have empty values in those input fields.

How should I bring the data entered in UI macro variable to the variable editor. I want to show exact same field data with the same style in record table.

1 ACCEPTED SOLUTION

What I am saying is that your input field "<input type="text" name="newsal" />" is in the context of the macro, and not the Record Producer, so the producer script I don't believe can read that value and do anything with it. You would actually need to have an onchange script in your macro write the value to a variable in your producer (the variable can be hidden) so that it is available to the producer script.


View solution in original post

10 REPLIES 10

In macro, you have to write a <script> tag having a function which add the value of all the fields (of macro) to a string in a format which you need.



Then in the record producer, you can write an onSubmit Client Script which calls the above function and pass that string value to a multi line text.



I have achieved my requirement using the above.




But just to update, there is a service now solution in Service Now share named "Catalog Table", which helps to add a table(grid) in catalog. And it also shows the value in variable editor. Sharing one link where you could get some details related to it.



Catalog Table Variable - fixes and improvements including multiple variables on the one form