January 23, 200520 yr I have a field called "topic_id"...contains information such as "8BS". I want to set up a calculation field that uses information within the text string to calculate data. eg if the text string contains "8" then "Year 8" is generated. in a separate field...if the text string contains "8" then "Stage 4" is generated. I can't identify a text function that does this...is there one or do I need to make up a script? TIA Stephen K
January 23, 200520 yr The TextToNum() function will return any numbers in a field with the text stripped off. Then you can use them in a calculation as necessary. If the data may contain more than one number separated by text, it gets a bit more complicated.
January 23, 200520 yr Stephen K: The PatternCount() function can be used in combination with Case() to conditionally do all the string generation for you... Case( PatternCount( topic_id ; "8" ) ; "Year 8" ; PatternCount( topic_id ; "7" ) ; "Year 7" ; ... ) BobWeaver: good to see you back!
January 24, 200520 yr Yeah it's hard having to type while standing up. LOL Well, I wasn't going to say anything about that.
Create an account or sign in to comment