Hi all
I have a field that has a pattern like this (the first word is followed by a comma).
1. Blue, this is my favourite colour, it is a royal colour and my boys also like blue.
2. Black, this colour is associated with darkness, bad luck and hardships.
3. Green, this colour is represents nature, green light and positivity.
4. Machine learning is very difficult.
5. Finance is my favourite subject.
I want to write a formula if the first word is followed by a comma then null
expected output:
1. Null
2. Null
3. Null
4. Machine learning is very difficult.
5. Finance is my favourite subject.
hey @Sifiso you can use the formula:
if Contains([Input], ',') Then Null() else [Input] endif
just repalace Input with our column name
Hi @Sifiso
If contains([FieldName],',') then Null() else [FieldName] endif
should work, checking for a comma and nulling if it's present, but leaving it as it is if not.
Edit:If there's a chance you sometimes want to keep something that has a comma in, there's a string function called EndsWith that would work also. If EndsWith([FieldName],',') then null() else [FieldName] endif
Hi. thanks for the quick response. I have updated the post (I think it was a bit misleading). there is multiple commas in each sentence but I want the logic that will take care of the comma after the first word.
@Sifiso what should the corresponding output now look like?
1. Null
2. Null
3. Null
4. Machine learning is very difficult.
5. Finance is my favourite subject.
Hi @Sifiso
Difficult to be 100% sure what will work without seeing the full data set, but if it's always 1 word and then a comma that we want as null(), then I'd expect something like the following will work: