mapping variable set variables to record producer

Gillerla Rajesh
Tera Contributor

Hi There,

 

i have variable set (single row) , i need to map variable set variables to record producer (target table), 

I tried this below script but it's not working,  any one help


// current.short_description = producer.Testingforpractice.sdc;
// current.description = producer.Testingforpractice.des;
// current.caller_id = producer.Testingforpractice.name;


current.short_description = producer.sdc;
current.description = producer.des;
current.caller_id = producer.name;
 
 
vice versa help me with multirow variable set also- how to map multi row variable set variable to record producer.

 

Regards,

Rajesh Gillerla.

12 REPLIES 12

Yes and you made a comment about using a Multi Row Variable Set:

MarkRoethof_0-1721757924584.png

 

 

So how do you picture this? Its 3 fields, if its for example 10 rows... how should those values land somewhere? 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi @Mark Roethof ,

 

I Have 3 fields  in variable set (multi row variable set), how can i map three fields to record producer to produce record in target table,

 

i tried above approach but values are not mapping i mean that it's taking empty values.

 

Regards,

Rajesh Gillerla.

Yeah but again, 3 fields, and then multi-rows... so for example 5 rows, then its 5 times that 3 fields. How do you picture that? Where should that end up in your record?

 

Or do you mean like for every row a new record should be generated? Where these 3 fields are just for unique records?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi @Gillerla Rajesh 

I've tried to requote your scenario, let me know if I'm right:

We have a multi row variable set let's say "myset"

It has three fields let's say "var1", "var2", "var3".

If it's a multirow variable set, you can add multiple values/records under these fields, let's say you added 2 records in them.

so you want you map both these two records in the target table record.

 

Let me know what is your target table, and how are you adding all the records in the single target records ?

 

HI @HrishabhKumar ,

 

my Target table name is incident table,

 

these are the my variable set variables, now how should i map those to target table,

 

 

GillerlaRajesh_0-1721818123689.png

 

if i insert two rows and submit means two rows also will be insert in to target table

GillerlaRajesh_1-1721818366451.png

 

 

 

Regards,

Rajesh