Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm having an issue finding a word in a text field which looks like below:
'NXP54661 A Finance',
'NAP54661 X Finance',
I needed to create another field to show whether 'X' appears in the text field as a single word rather than a letter of a word. in the two shown above, the first should come as False, while the second should come as True. I tried a couple of string functions, but none gave me desired result. For example Index function will count the first as True which is not what I wanted. any help is much appreciated. Thanks.
You can use 'index' function as below.
index(F1,' X ')
F1 is an item of words, and the second parameter contains spaces before and after X.
If you want to use the presence or absence of X as a condition to create other items, you can write the script as follows.
if(index(F1,' X ')>0,'aaa') as Xfield,
Please see the attached file for the solution. Hope this helps: