How to map Variable Set variables to table columns

Kentaro Numata
Tera Guru

Hello, It's Kentaro.

 

I create catalog items with Record Producer and manage variables with Variable Sets.
I would like to register the entered value in Incident, but it does not work.
I tried using Variable Set's Catalog Client Script and Incident's Business Rule, but without success.

 

Sorry to ask such a basic question.

I would like to know how to solve this problem.

 

スクリーンショット 2023-10-24 11.08.10.png

 

Thanks,
Kentaro.

2 ACCEPTED SOLUTIONS

Tai Vu
Kilo Patron
Kilo Patron

Hi @Kentaro Numata 

You can add some lines into the Record Producer Script to achieve it.

Sample below.

TaiVu_0-1698121489656.png

 

Sample Script

current.u_target_user = producer.it01_target_user;
current.u_target_user_organization = producer.it01_target_user_organization;
current.u_organization = producer.it01_organization;
current.u_target_user_organization_other = producer.it01_target_user_organization_other;

 

Just add more fields into the script per your requirement.

 

Let me know if it works for you.

 

Cheers,

Tai Vu

View solution in original post

Sorry, I found it!!

スクリーンショット 2023-10-24 16.20.28.png

View solution in original post

8 REPLIES 8

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Kentaro Numata ,

 

U can write a script on record producer itself. On record producer u will find an area above variables section only.You can try something like below.

 

current.field_name = producer.variables.field_name;// replace field_name with proper variables backend value.

 

Thanks,

Danish

 

Tai Vu
Kilo Patron
Kilo Patron

Hi @Kentaro Numata 

You can add some lines into the Record Producer Script to achieve it.

Sample below.

TaiVu_0-1698121489656.png

 

Sample Script

current.u_target_user = producer.it01_target_user;
current.u_target_user_organization = producer.it01_target_user_organization;
current.u_organization = producer.it01_organization;
current.u_target_user_organization_other = producer.it01_target_user_organization_other;

 

Just add more fields into the script per your requirement.

 

Let me know if it works for you.

 

Cheers,

Tai Vu

Hello, @Tai Vu!

Thanks again for your help!

 

Where can I access attachment records?

I looked for it, but couldn't find it.


Also, I had success with Business Rules.
Which function is better?

スクリーンショット 2023-10-24 14.49.08.png

 

Thanks,

Kentaro.

Hi @Kentaro Numata ,

OOTB, The attachment will automatically attach to the record after submission. Did you create specific variable type Attachment or something?

Screenshot 2023-10-24 at 13.30.39.png

 

Using Business Rule means that it will be applied to every database action (here's insert) that meets the conditions specified in the "When to run" tab.

My suggestion would be to place the script within the Record Producer. The simple rationale behind this is, why create a Business Rule when we can accomplish the same goal using the Record Producer we've already set up? 😉

 

Cheers,

Tai Vu