- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 07:30 AM
Can someone help me how to achieve this, we have a user-defined table in which we have a field called state when that record is created we have a trigger on that table which should create an incident, when creating incident we need to set the state to whatever the record on the user-defined table. The user-defined state value and name are different , how to achieve this ?
if u_usertable_state = assigned then create the incident in assigned state ( can we write any script for this )
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 10:43 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 09:12 AM
Hi Rudhra,
I am not sure on the use case to create incident from user record. That said, you can use Flow Designer inline script to handle the mapping i.e return the choice value of the state depending on the incoming choice value. https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/flow-designer/concept...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 10:02 AM
Thanks Pradeep for the reply ,
Can you please help me with the script
Table is
u_usertable_state = assigned(1 is the value ) then create the incident in assigned state 2(assigned)
else state = work in progress (2 is the value) then create incident in working in progress state ( 3 is the value

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 10:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 12:59 PM
Thanks pradeep , this is erroring out , this is the table on which flow is triggered (u_usertable_state) and do we need to add .value ? ( I tried that too it is not working ) how to log this ?