Skip to main content
Solved

Need a transformer to filter by amount of characters given

  • December 15, 2016
  • 7 replies
  • 111 views

Hi,

I am looking for a transformer to filter by the amount of characters.

for example I have a set of ID numbers and I need to extract all the Id's that are only 18 characters long.

Help please !

Thanks,

Samuel

Best answer by itay

Hi @sspag1I would use the StringLenghtCalculator and test the string length attribute in a tester.

Hope this helps

View original
Did this help you find an answer to your question?

7 replies

itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • Best Answer
  • December 15, 2016

Hi @sspag1I would use the StringLenghtCalculator and test the string length attribute in a tester.

Hope this helps


pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • December 15, 2016

Hi,

Use stringlengthcalculator and tester to filter out


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • December 15, 2016

I would use the AttributeValidator transformer and test on the validation rule "Maximum length".


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • December 15, 2016
erik_jan wrote:

I would use the AttributeValidator transformer and test on the validation rule "Maximum length".

Nice one @erik_jan, didn't consider it, guess I'm stuck thinking the 'old way' sometimes...

 


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • December 16, 2016
itay wrote:

Hi @sspag1I would use the StringLenghtCalculator and test the string length attribute in a tester.

Hope this helps

No need to calculate string length outside of the tester unless you want to store for later use. It can be done in one tester

 

 


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • December 16, 2016
ebygomm wrote:
No need to calculate string length outside of the tester unless you want to store for later use. It can be done in one tester

 

 

True and I would personally use the function in the transformer, it's sometimes not that easy to guess the expertise level of a user so I usually tend to provide the easiest solution.

 

 


  • Author
  • December 20, 2016
itay wrote:

Hi @sspag1I would use the StringLenghtCalculator and test the string length attribute in a tester.

Hope this helps

Thanks itay

 

I eventually worked it out and did exactly this

 

Thanks for the reply

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings