- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 12:01 AM
Hi,
I have a requirement in transform map where i have to reject the record or ignore that particular string field if the value in that string field exceeds the length of the field. This data is coming through excel into my instance table.
Please help me in this regard asap.
Thanks in Advance!
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 12:49 AM
Hi,
In the transform map, click on the source field whose length you wanted to check.
if(source.u_your_field.toString().length>7) {
ignore=true;
}
Note: you need to mention the right field name and length you wanted to check in the code.
Mark the comment as correct/helpful if it helps to solve the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2020 03:13 AM
Can i make use of script include to achieve this to make it configurable?
Does it make sense to make it configurable or should i use the above script(hard-code max length) for other fields too to check the length?