map to field disappears where part of variable set

TiffanyL
Tera Contributor

Where I attempt to create a variable set for similar items, I notice the "map to" option disappears but cannot locate a UI policy. Can I not use this feature where using as a variable set? Is it possible to identify and inactivate the UI policy?

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

That is correct. This is also kinda logical because Variable Sets could be used on multiple Catalog Items, Record Producers, Record Producers on different tables, etc..

You could workaround this and use simulate map2field by using the Script field in Record Producers.

For example:

current.assigned_to = producer.requested_for;

If you are applying that piece of script exactly on multiple record producers, obviously you could choose to have this in a Script Include, and just call the script include from the script field in the record producers.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

View solution in original post

4 REPLIES 4

Mark Roethof
Tera Patron
Tera Patron

Hi there,

That is correct. This is also kinda logical because Variable Sets could be used on multiple Catalog Items, Record Producers, Record Producers on different tables, etc..

You could workaround this and use simulate map2field by using the Script field in Record Producers.

For example:

current.assigned_to = producer.requested_for;

If you are applying that piece of script exactly on multiple record producers, obviously you could choose to have this in a Script Include, and just call the script include from the script field in the record producers.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Daniel O_Connor
Kilo Guru

Might be a bit of a late response for you, but if you create the variable as normal, then re-assign it to a set, it will keep it's field mapping.

I use a formatter in my Service Portal to give a nice section type design to some forms, and this is how I got around it. 

Thanks Daniel You Answer is Helpful 🙂

No problem. I also actually just recently saw you can go to the variables list, and in the list layout put in variable set and catalog item. So now I can manipulate multiple variables in one go and in bulk.

As previously mentioned it works OOB the way it does because generally variable sets should be variables that are generic, that you can reuse across many different catalog items or requests.

For me it's a bit more specific as we have a specific UI development that utilises sets, so I do it this way 🙂