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-17-2025 05:45 AM
Hello @Snowman15 , try this,
gr.addQuery('code', extractedCode.toString());