Split the value from look up select box field and auto populate in single line text variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2025 12:26 AM
I have a look up select field where I am populating the values of u_code, u_label by seperator (u_code|u_label)
then I have a single text variable which is read only where I need to auto populate the u_code that is getting displayed in the look up select box field.
Here, I cannot change the Look up select box to Reference field.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2025 12:44 AM
either change the variable to Reference
OR
you can write onChange catalog client script and get the value and then split.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2025 01:11 AM
Can you please help me with the scripting as I tried different ways but still this is storing the sys_id of the record in the code field.
what needs to be done here. please help me. thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2025 01:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2025 01:29 AM
are you getting sysId when you added the info message?
If yes then you can GlideRecord and get the value of field u_code from that table
If you are allowed to change the variable type then please make it Reference type
Then you can use Auto populate feature and populate the u_code in your next single line text variable
Auto-populate a variable based on a reference type variable (Utah)
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader