Skip to main content

Hi I have a feature service that is apart of a Survey123 survey. The survey will indicate if something has failed in a variety of ways.

 

I currently have a workspace that has a testfilter transformer looking through 50 different attribute columns looking for the word Fail. Then from each output port there is an action that is taken. Is there a transformer that I could use to search the whole attribute table for the word fail instead?

 

Thanks!

Hi @abysmal-ukulele​,

Please have a look at the FME Hub transformer AttributeValueSearcher. I think it is exactly what you are looking for.


If the attribute will only contain the word Fail and nothing else you could use an attributevalidator. Test for Contains Regex and only pass items where the attribute does not equal Fail. 

^(?!Fail$).*$

 Any features with an attribute equalling Fail will pass through the Failed port, the attributes containing the word fail will be detailed in a list

 

I think this regex should work if you just want to look for the word Fail but probably needs checking!

^(?!.*\bFail\b).*$

 


If the attribute will only contain the word Fail and nothing else you could use an attributevalidator. Test for Contains Regex and only pass items where the attribute does not equal Fail. 

^(?!Fail$).*$

 Any features with an attribute equalling Fail will pass through the Failed port, the attributes containing the word fail will be detailed in a list

 

I think this regex should work if you just want to look for the word Fail but probably needs checking!

^(?!.*\bFail\b).*$

 

Hi @ebygomm​, I'm afraid I'm really new to this.  The line of code is what I would type into what? Am I using a tester transformer with that code?


Hi @ebygomm​, I'm afraid I'm really new to this. The line of code is what I would type into what? Am I using a tester transformer with that code?

image


Hi @ebygomm​, I'm afraid I'm really new to this. The line of code is what I would type into what? Am I using a tester transformer with that code?

Thanks again @ebygomm​  I like your suggestion. I'm debating how to create my workspace. I could use the attribute validator or I have also created a TestFilter that has close to 50 cases. I'm debating which of the two methods would be more sustainable to maintain vs. will be processed faster.


Hi @abysmal-ukulele​,

Please have a look at the FME Hub transformer AttributeValueSearcher. I think it is exactly what you are looking for.

Hi @daveatsafe​ unfortunately I can't use this on our production environment. But I think you're right the transformer looks promising. Cheers!


Reply