How to map a variable set selection to a field on a table?

jaubert
Tera Guru

I have been tasked with an assignment to convert one of our forms into a record producer within SN.  I've created a table and created a record producer for our end users to complete and submit.  I may be a little confused on the associations within SN, so some clarity is greatly appreciated.  To my understanding a record producer is a form for the end users to submit a new record into a table.  While ITIL users have a different gateway, we can add new records directly on the table through the table's form.  I am expecting the user to fill out the form and when I view the table the values should appear with the mapped field.  I am wondering if this isn't the behavior for all field types, ie variable set of choice fields.

What I am trying to accomplish is on the record producer allow the end user to select multiple values from a variable set and those value update the table.  Please let me know if I am thinking of this the wrong way as there are still so many areas I am unfamiliar with in SN.  

1 ACCEPTED SOLUTION

Allen Andreas
Tera Patron

Hello,

Yes, record producers - produce a record on the target table.

For variable sets, since they can be used on multiple items/producers, etc., due to that, you're unable to use the "map to field" feature because:

  1. It wouldn't work anyway
  2. A UI policy hides the "map to field" field if the variable is associated with a variable set

for record producer scenarios, you would utilize the record producer script (on the record producer settings page, right in the middle) and map them yourself like so:

Example:

find_real_file.png

current.field_name = producer.field_name; //current is your target net new record and producer is the record producer

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

5 REPLIES 5

Hi,

A list field is a reference to another table and in the back-end each selection is a sys_id. So 3 selections, for example, is really a comma-separated string of sys_ids (3 of them).

So the checkboxes on your record producer would require you to lookup the intended sys_id for that selection and then you'd have to build a string of these sys_ids to then set the list field on your target record.

Basically, it's best to keep the format the same. If it's a list field on the target table, then make it a list collector on the record producer (just filter it down using a reference qualifier to only show the 3 selections).

If you can't do the above, where the field types are the same, then you'd just have to work out the mapping from record producer to target record accordingly.

Please mark reply as Helpful, if applicable. Thanks!

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!