Is there a benefit to using FindString != -1 vs. Contains as an if, then qualifier? I know the benefit of using contains is that it gives the case insensitive option which you can't do with findstring without uppercase([field]) or lowercase([field]), but is there a downside to using this over findstring?
Solved! Go to Solution.
I have a coloumn with all months and years since 2011, but I just need to extract the years 2016 and 2017. How can I specify these 2 years in a single FindString Formula.
The data is april, 2016, May, 2013, January 2017
I have been trying this but to no avail.
FindString([DateTime_Out],"2016"&"2017")>-1
You just need to use two FindString expressions - you can put them in the same formula with "or" in between:
FindString([DateTime_Out],"2016")>-1 or FindString([DateTime_Out],"2017")>-1
I somehow have to pull versions from a specified lookup table which hold values like this:
Full Version:
9.0.22
9.0.1
8.5.41.B.RELEASE
Install paths are like this:
Installation Path
/OPT/APPS/TCSERVER3216/TOMCAT-8.5.41.B.RELEASE
/OPT/APPS/TCSERVER3216/TOMCAT-8.5.41.B.RELEASE
/TMP/TEZ/TEZ-0.8/TOMCAT/APACHE-TOMCAT-9.0.1
/APPS/APACHE-TOMCAT-9.0.22_MSGAA_C3_W2_SV
/APPS/APACHE-TOMCAT-9.0.22_PCS_SV1
/APPS/APACHE-TOMCAT-9.0.22_MS_SV1
/APPS/APACHE-TOMCAT-9.0.22_CC_C3_SV2
/APPS/APACHE-TOMCAT-9.0.22_CC_SV1
/APPS/APACHE-TOMCAT-9.0.22_IRT_SV1
/APPS/APACHE-TOMCAT-9.0.22_WINS_SV1
/FSTAPPS/FSTOHS/TOMCAT
/APP/ST/SYNINSTALL/SYNPATCH/026/COMPONENT/TOMCAT
/OPT/APPS/TCSERVER3216/TOMCAT-8.5.41.B.RELEASE
/APP/ST/SYNINSTALL/SYNPATCH/017/COMPONENT/TOMCAT
/APP/ST/SYNINSTALL/SYNPATCH/017/COMPONENT/TOMCAT
D:\APPS\TOMCAT\CURRENT
D:\APPS\TOMCAT\BOTOMCAT\
4 days to no avail please any help would be super appreciated.
Hi @Kim_Donner
Solution is attached.
Although it's not in line with the original question, this is a great example to leverage RegEx. If only full version numbers are required then using the below in a RegEx tool with the Output method set to Parse will pull out the examples.
(\d+\.\d+\..*)
If the full path contains a non-version number (eg. TOMCAT, BOTOMCAT) and this is required - then by first trimming the field of '\' and '/' and then using the below RegEx replace to isolate the final component of the full path, these can also be obtained.
trim([Field1], '\/')
if isnull([Full Version]) then REGEX_Replace([Field1], '.*\/|.*\\', '')
else [Full Version]
endif
Hope this helps!
Awesome I started with RegEx and just couldn't get there. I think I see why given your response. I will test now. Thank you very much.