Help with transform field map script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 12:00 PM
Hi all,
I am struggling with a field map script, and could use some guidance from the community.
Due to limitations, the source spreadsheet columns cannot be modified, so I need to handle everything via scripting.
One of the source fields, source.u_softwaretype, contains values formatted like:
"GH001 - Software Not found"
What I need to do is:
Extract just the code portion ("GH001") from the text.
Perform a lookup in the x_software_list_code_mapping table where:
supplier = 'WILLIAMS'
code = 'GH001' (the extracted value)
From the matched record, retrieve the serial_number field value.
Populate the target reference field with that serial_number field value.
This is the script I tried so far but is not working:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 12:45 PM
Hi @Snowman15 ,
Try adding logs inside your script and where it breaks, if target is a reference field , try returning "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 01:16 PM
hi @YaswanthKurre thanks. Tried this but didn't work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 12:46 PM
Hi,
Sometimes you need to convert a field name to string to make it work. Try the below:
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 01:18 PM
hi @palanikumar thank you, unfortunately this didn't work either.