Hi,
How can I replicate my contains formula into one line? I want to do this so I can use a text input and replace this string what an input.
Formula =
If Contains([Value]), "Louis) or
Contains([Value]), "Ren")
Is there a way I can make it something like
Formula = Value Contains("Louis","Ren","Thomas")
thanks.
Solved! Go to Solution.
@alexnajm i dont think IN works exactly as contains
@wonka1234 good call, it's not the exact same but it condenses it to one line at least.
@wonka1234 what @alexnajm mentioned is right but just add if logic to it and you can filter it based on if else logic
if [Value] in ("Me1","Me2","Me3") then "In" else "Out" endif
this will give you the results as in and out and add a filter to it to get either In data or Out
Additionally if you want to filter with only "Me1,2..." then give this formula
if Contains([Value], "me1")
then "IN"
elseif Contains([Value], "me2") then "IN"
else "Out" endif
This will filter out all Me1,2... in the data, i don't think so there is another way to do it
@RRaoDannayak i dont think can be converted to a user input, thats why i wanted one line. I wanted to do it for an analytic app.
Hi @wonka1234,
If we have a better idea of what you are trying to accomplish by putting this logic on one line, that would be helpful! Ideally a workflow, but even screenshots would be a step forward.
Because from the description so far, it sounds like you have a Text Input getting updated by an Interface tool - but perhaps you could directly connect the Interface tool to the Formula tool instead!
-Alex
-Alex
Hi @wonka1234
Unfortunately you will not find a way to use the contains formula different than doing contains(value, 'value1') or contains (value, 'valueN')... And there is no other string formula that do exactly the same job that the contains formula do.
What you can do is try to use the regex formulas to achieve the same result in a more 'condensed' way, like this:
If you manage to get your user inputs, concatenate them with | as separator and replace the value inside of thIs formula, it will work as expected.
@wonka1234 One way of doing this. Make sure the values should be entered in line by line (using \n as delimiter)
@binuacs it doesn't seem to work for more than two values as a heads up!