1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
231 views
by adam-d-5091 (370 points)
edited by adam-d-5091
I'm having a hard time trying to find what to place in a condition node to look in PID-3.1 and if it contains alpha characters (we only want to keep ones with just numbers in this field) then discard.

Thanks in advance for any help.

1 Answer

+1 vote
 
Best answer

One way is to set the condition node to be 'Custom' and use this code:

return StringUtils.isNumeric(source.getNode('PID-3'.1));

This will look at the field in the source message and, if it is just numbers, return true.  Otherewise, it will return false, which will cause the condition to fail.  

 

by jon-t-7005 (8.2k points)
selected by adam-d-5091
by adam-d-5091 (370 points)
Thank you, works as needed.
...