July 3, 20169 yr Hello, This question likely spans multiple discussion areas (finding/calculations/script) but I thought this would be the place to start (mods, please move if appropriate). First issue, I'm attempting to extract some data from a text string in a field. The initial field which contains the text strings is a value list; the value list contains 3 choices: "x is your vacation time", "y is your vacation time", "indefinite". The user chooses the appropriate value. I'd like to have a function/calculation to determine if the value list field choice contains either "x" , "y" or the word "indefinite" . My initial quandary is if getting the desired result is best achieved through an if statement, case statement or another method. (2nd issue- once the result has been returned, creating a script to copy the result into the other field -I'm imagining a set field- but I can try tackling that once the first problem is resolved). Your guidance/thoughts would be appreciated. Jack
July 3, 20169 yr 37 minutes ago, skingjack2 said: My initial quandary is if getting the desired result is best achieved through an if statement, case statement or another method. That depends on what exactly you want to do with the desired result. If - for example - you want to use it in order to determine the contents of another field, then you would most likely want to use the Case() function, e.g.= Let ( w = LeftWords ( Textfield ; 1 ) ; Case ( w = "x" ; "A" ; w = "y" ; "B" ; w = "indefinite" ; "C" ) ) This could be used directly as the formula of a calculation field. -- P.S. One could argue that the three values - "x is your vacation time", "y is your vacation time", "indefinite" - are not members of the same domain, and should not be entered as interchangeable selections into a single field.
August 3, 20169 yr Author Hello Comment, Apologies for the delayed response- thanks for your input. I'll explore your suggestion and see if I can make it work. Jack
Create an account or sign in to comment