Stephen K Posted January 23, 2005 Posted January 23, 2005 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
BobWeaver Posted January 23, 2005 Posted January 23, 2005 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.
Vaughan Posted January 23, 2005 Posted January 23, 2005 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!
BobWeaver Posted January 23, 2005 Posted January 23, 2005 Hi Vaughan, Yeah, Nice to be back. Got abducted by those pesky aliens again.
Vaughan Posted January 24, 2005 Posted January 24, 2005 Yeah it's hard having to type while standing up. LOL
Stephen K Posted January 24, 2005 Author Posted January 24, 2005 Thanks fellas Both do what I need...its good to have options! Stephen
BobWeaver Posted January 24, 2005 Posted January 24, 2005 Yeah it's hard having to type while standing up. LOL Well, I wasn't going to say anything about that.
Recommended Posts
This topic is 7312 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now