I have used Regex, Replace, Contains, and it is NOT working
I want it to flag all the ones that contain MULT
IF REGEX_Match([ID Codes], 'MULT') THEN '0' ELSE [Payee Name Count] ENDIF
thanks
Solved! Go to Solution.
Can you do a Contains instead of a RegEx_Match? I don't see a reason why that wouldn't work if your column ID Codes has "MULT" in it
IF Contains([ID Codes], 'MULT') THEN '0' ELSE [Payee Name Count] ENDIF
If that isn't working, can you provide some sample data?
Edit: Meant to add - use a Formula Tool
@hi2019
use formula tool
if Contains([ID Codes], "MULT",1) then '0' ELSE [Payee Name Count] ENDIF (make sure your field created is string)
[the last 1 is added to make it case sensitive , you can remove it if not required)
if Contains([ID Codes], "MULT") then '0' ELSE [Payee Name Count] ENDIF
this should work
mark done if solved
its not working- how could I use find and replace t6ool-wouldnt that work?
@hi2019 What's not working/what's the error message?
You could make it work with F&P as long as the field is only "MULT". Otherwise, you'd end up with something like
"WordsMULTWords" -> "Words0Words"
which I don't think is what you want...?
@hi2019 - Is your issue that you're getting a message about something being a string when it shouldn't be, or a number when it shouldn't be?
I'm noticing that you put the zero in single quotes, which will make it text. If your field is set to number format, that would cause an issue and could be what you're seeing.
This is the formula with 0 being a number, not text. And, to be on the safe side, I threw a "tonumber" field onto the "else" clause
IF Contains([ID Codes], 'MULT') THEN 0 ELSE tonumber([Payee Name Count]) ENDIF