- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 03:27 PM
Hello,
I have JSON data in the Staging table field.
I have to map with reference field in table.
But transformation is not working as anticipated. Could someone help me ?
I've also referred other community questions.
https://community.servicenow.com/community?id=community_question&sys_id=b8f93179db0c67c01cd8a345ca9619eb
https://community.servicenow.com/community?id=community_question&sys_id=83ed1ac4db2c90104819fb2439961950
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 08:55 PM
please return the value which you wish to be searched in the field u_gen_prod_info of the table being referred by Type of Account field
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 06:47 PM
Hi Sathish,
The function should return the value to enter into the field.
answer = (function transformEntry(source) {
var accnttype = JSON.parse(source.u_gen_prod_info);
if (accntType.product == 'Mortgage') {
return lprod;
}
})(source);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 08:41 PM
Hi,
in the field map script you need to parse the JSON
also while returning you need to return value which is stored in u_gen_prod_info
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 05:03 AM
Hi Ankur,
But TYpe of Account (mapping field) has to refer "Loan product" but not u_gen_product_info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 08:55 PM
please return the value which you wish to be searched in the field u_gen_prod_info of the table being referred by Type of Account field
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader