- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 07:07 AM
Hello,
All variables of record producer are getting transferred /mapped in custom target table (not in fields present in table, but they are visible in 'Task Read only Varriable editor' except one new multirow varriables I mean to say; 'map to field' is false for all varriable.
'
I am looking for:
I want to fetch and Print all 10 to 15 rows of multirow varrible set in field -type multi Line.
I wonder why fields of mutirow varriables is not coming in Variables section even once
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 08:56 AM
Hi @PriyankaSadhwni ,
Hope you are doing well.
If map to field is set to false the variable mapping must be defined in the script field on the record producer.
Please refer below script to print mrvs values
var mrvs = JSON.parse(producer.testmrvs); // replace with mrvs internal name
var value = "";
for (var i in mrvs){ // consider test1 and test2 are two variable in mrvs
value =value+ "test1" + " "+mrvs[i].test1 +" "+"test2" + " "+mrvs[i].test2+"\n";
}
gs.log(value);
Please mark this response as correct or helpful if it assisted you with your question.
Regards,
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 07:44 PM
any client script or ui policy is clearing out those?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 12:45 AM
@Ankur Bawiskar NO Such CS or UI Policy as Except MRVS all other variable are getting mapped
@Harshal Aditya I see only redirect URL in script of record producer
producer.portal_redirect =XXXX+Current sys_id...etc
I created another variable in another varrible set(non-multirow)
I can write CS which can merge :all rows in format like
Row1.2, row1.2; row2.1,row2.2;row3.1,row3.2;
In My CS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2023 05:59 AM
@Harshal Aditya Format I need is : data value test 1 #data value of test 2
consider test1 and test2 are two variable in mrvs
@Ankur Bawiskar After JSON.stringify(obj); it is coming like: field name of test 1 : data value, field name of test 2:Value. : expected format-data value test 1 #data value of test 2
Please advice.