Publicado Thu, 18 Mar 2021 14:14:14 GMT por Andrew Koontz Solutions Engineer
I have assigned a short description to a text variable. I would like to know if it is possible, presumably with a condition activity, to check if a string of text contains a specific word, like Approval or Rejection. For example if a variable reads, "Approval Letter for ABC Company...". The company name will be different every time obviously. So I just want to check if the first word in that string is Approval and update a status based on that. If anybody has a better way to achieve this, I'm open to suggestions. Thanks!
Publicado Wed, 24 Mar 2021 07:24:04 GMT por Fabian Kall
I'm assuming You're referring to a global variable withing a workflow.

You can use VBAs InStr-Function to do this.
If the name of Your variable is GV_text, you can check if it contains the substring "Approval" in a condition activity with:
InStr(GV_text, "Approval") <> 0

See here for the InStr's specification:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.strings.instr?redirectedfrom=MSDN&view=net-5.0#Microsoft_VisualBasic_Strings_InStr_System_String_System_String_Microsoft_VisualBasic_CompareMethod_

 

You must be signed in to post in this forum.