
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 10:04 PM
Hello guys! I have another question. I tried searching for it already but can't find the answer so I'm posting it here.
I will try to explain it in as detail as possible. Currently, I'm making a Transform Map based on JSON Data. At this moment, I already know that writing a script is the Import side but I do not know what to write. What I need to do is to use a single source field for multiple target fields.
For example the value of source field "use_choicelist" are:
"data14333":[
{
"innerNo":"1",
"value":"Use"
},
{
"innerNo":"2",
"value":"Dont Use"
},
{
"innerNo":"3",
"value":"Dont Use"
},
{
"innerNo":"4",
"value":"Use"
},
{
"innerNo":"5",
"value":"Dont Use"
}
]
What I need to do is to use the data above to insert into different target fields.
Transform Map
Import Table Order Table
use_choicelist <-----------------------------------------------> use_choice1 (value: Use)
use_choicelist <-----------------------------------------------> use_choice2 (value: Dont Use)
use_choicelist <-----------------------------------------------> use_choice3 (value: Dont Use)
use_choicelist <-----------------------------------------------> use_choice4 (value: Use)
use_choicelist <-----------------------------------------------> use_choice5 (value: Dont Use)
I hope you guys will help me.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2022 03:32 AM
Thank you to
var obj = JSON.parse(source.change_use_of_module);
for (var i = 0; i < obj.length; i++) {
if (obj[i].innerNo == "4") {
return result = obj[i].value;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 04:47 AM
Nope you just need to define the Transform Script which is just beside the Field Map section. see image below:
Now select On After and use the script above as shown below:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 04:52 AM
thank you for the very detailed reply. I will try it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2022 03:32 AM
Thank you to
var obj = JSON.parse(source.change_use_of_module);
for (var i = 0; i < obj.length; i++) {
if (obj[i].innerNo == "4") {
return result = obj[i].value;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2022 03:49 AM
Hi
Glad to help you here. Just confirming, if my solution helped you please mark my answer as correct and close this thread for others.
Thanks for wishing on the MVP status 🙂
Regards,
Shloke
Regards,
Shloke