- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-18-2023 01:48 PM
Based on this post Solved: Flow Designer - adding "substring to remove last c... - ServiceNow Community
and others I have tried a number of approaches to a script in the Update Requested Item Record action of a fb flow to copy the last 7 characters (the numeric part) of the RITM number into a new field I created on the sc_req_item table called u_contractor_id.
I am new to scripting
I have tried multiple variations of the following:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-18-2023 10:18 PM
Can you show your configuration?
Please compare it with this (working) example:
Note that the applied transformations are as follows:
1.) Substring (Start Index=4, Leave End Index empty)
2.) Convert String to Number (No arguments)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-19-2023 06:08 AM
The transform approach worked. Neither script worked.
But that's fine, I'd rather avoid using scripts anyway.
It turns out the "not a valid record" error I kept getting was do to a bad catalog variable.