Want to compare get text value with predefined words in a notepad

Hi Everyone,

I want to compare get text value to predefined words in a notepad and make decision if the get text words present in that notepad. Could you please give some idea on this

Thanks,
Ulaga

One way would be to read the contents of the notepad file as a string variable (using Read Text File) and then use the Contains method to look for the value you got from Get Text:
NotepadPredefinedWords.Contains(RetrievedText)
WordComparison.zip (25.0 KB)

2 Likes

If I understand u correctly, you want to search a specific word (key) in a text from notepad.
Iā€™d do something like this.

  1. Read text file
  2. Convert the content into array (performance might be an issue)
  3. Get input for the key to search
  4. IF-ELSE, with condition is key exist in the array
  5. Display result.
1 Like

Thank a lot @Mateus_Cruz.

@ajeed Thank you for your Idea and suggestion.

Hi @Mateus_Cruz

I have a doubt.

str1 (It is actually a subject in salesforce) = want to renew my techno products
str2 (It is description field in salesforce) = Techno products update for the current subscription - techno99887, okml93883, Switch_poiu

Now I have notepad with some 900 words
like Techno99887
ok ml938883
Switch
Poiu

I need to make the decision as true if str1 or str2 word is present in notepad else the decision is false.

Contains does not work in this logic as it searches the whole substring.

Is there any other function or simple logic for this?

Thanks,
Ulaga

Hello,

You can use the regEx inserted.

Thanks,
Meg

@megharajky

How regex could be used as there are more than 500 plus keywords in notepad to be compared with the salesforce sr subject and description.

Thanks,
Ulaga

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.