Nemo Posted November 9, 2006 Posted November 9, 2006 Ok I've never made any calculations that had to parse before but i have alot to import and i definatly don't want to enter this stuff manually. Does anyone know any good in-deapth resources for parsing data?
Fitch Posted November 10, 2006 Posted November 10, 2006 I'd start with the online help, look under text functions. Another good resource is FM Forums -- give us some examples and we can help you parse them.
Nemo Posted November 13, 2006 Author Posted November 13, 2006 Welp Here it is. I have a database that outputed two types of strings of data, one looks like this: 00 00 00 PROCUREMENT AND CONTRACTING REQUIREMENTS and the other like this: 00 24 16.16 Scopes of Proposals (Multiple-Prime Contract) I need to seperate the numbers in the beginning from the trade name at the end. I've contomplated just writing a calc to erase the numbers, and another to erase the text, would that be the easiest way? Or would a calc that sperated them be the best course of action, and if so, how the heck would you write something like that?
Raybaudi Posted November 13, 2006 Posted November 13, 2006 Hi the Filter ( ) function that you had used is a good way to solve your problem, but you have to be sure that there aren't numbers into the trade name.
mr_vodka Posted November 13, 2006 Posted November 13, 2006 Try something like this, where 'raw' is your raw data field. Let ( [ fl = Left ( Filter (raw ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 1 ); // First alpha letter returned lp = Position ( raw ; fl ; 1 ; 1 ) // Position of first letter returned ]; Left ( raw ; lp - 1 ) // Left value parsed ) Let ( [ fl = Left ( Filter (raw ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 1 ); // First alpha letter returned lp = Position ( raw ; fl ; 1 ; 1 ) // Position of first letter returned ]; Right ( raw ; Length ( raw ) - lp + 1 ) // Right value parsed )
Fitch Posted November 14, 2006 Posted November 14, 2006 If the strings of numbers are always fixed-length? If so then I'd just use the Left() function to separate them. Or I might Substitute() the white space between the number and the name with a paragraph symbol, the use GetValue() to grab the number and name.
Recommended Posts
This topic is 6583 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