ITSM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2024 11:47 AM
how to update a reference field of a target table if short description of target table contains a number of source table using transform map.
if anyone knows please let me know quickly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2024 12:02 PM - edited ‎09-26-2024 12:47 PM
Hi @KritiK ,
If I understood your question correctly, you want to update reference field of a target table.
I think you can't update a reference field directly through transform map field mapping. if you are sending a new reference field value then you can use 'Choice action' to do either of the below options,
1. Create: To create a new record in ref table with new value coming from source.
2. Reject: Reject that entire record entry/update to the target table and go to the next record to transform.
3. Ignore: To ignore the reference field population in target table (since you sent a different value other than what is present in the reference table).
You can try one thing and see if that works, Write a onBefore transform script to update the reference table value first, based on the source field value coming in and through which you will glidequery the reference table in the onBefore script and update the value. After the onBefore script updates the value, the field mapping should pick the updated reference field value from the reference table.
If this address your question, please mark this response correct by clicking on Accept as Solution and/or Kudos.
You may mark this helpful as well if it helps you.
Thanks,
Animesh Das
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 02:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 02:42 AM - edited ‎09-27-2024 02:43 AM
Hi @KritiK ,
Firstly, can you please elaborate your requirement first a bit more?
Secondly, simple onBefore tranform script construct should start like this '(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {'.
Thirdly, Does the value of sourceRecord.PRID_requested exist in the reference table from where u_requested_for is coming? If not then what you want to do and if yes then what you want to do?
I am struggling to figure out what exact requirement you have and how you are trying to achieve that?
If this address your question, please mark this response correct by clicking on Accept as Solution and/or Kudos.
You may mark this helpful as well if it helps you.
Thanks,
Animesh Das
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 04:36 AM - edited ‎09-27-2024 04:37 AM
this is coming from the source which is reference field and same field need to update in target 'PRID_requested'
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {