Dani R Posted February 18, 2011 Posted February 18, 2011 how can i break down a file name that i can get in a Variable1 the file name and in Variable2 the type?
andries Posted February 18, 2011 Posted February 18, 2011 Take a look at these customfunctions: After: http://www.fmcustomfunctions.com/functions_display_record.php?functionId=83 Before: http://www.fmcustomfunctions.com/functions_display_record.php?functionId=84
Lee Smith Posted February 18, 2011 Posted February 18, 2011 Very vague on what you are trying to do. Leftwords, Middlewords, and Rightwords (Maybe) Post an example of the text involved. Note: Show what you have now, and what you are wanting to Parse out of the existing text. Give use more than one example so that we can see what patterns are involved. Lee
comment Posted February 18, 2011 Posted February 18, 2011 Before dot = Left ( FileName ; Position ( FileName ; "." ; 1 ; 1 ) - 1 ) After dot = Right ( FileName ; Length ( FileName ) - Position ( FileName ; "." ; 1 ; 1 ) )
adyf Posted February 21, 2011 Posted February 21, 2011 Before dot = Left ( FileName ; Position ( FileName ; "." ; 1 ; 1 ) - 1 ) After dot = Right ( FileName ; Length ( FileName ) - Position ( FileName ; "." ; 1 ; 1 ) ) Could I use a similar calculation to break down a text field that contains text either side of " - " into two seperate fields? The text either side of the " - " can be multiple words.
comment Posted February 21, 2011 Posted February 21, 2011 Could I use a similar calculation to break down a text field that contains text either side of " - " into two seperate fields? Sure - provided you adjust for the length of " - " in the second formula. Another option is to substitute " - " with a carriage return, then use GetValue() to extract a single line.
adyf Posted February 21, 2011 Posted February 21, 2011 Sure - provided you adjust for the length of " - " in the second formula. Another option is to substitute " - " with a carriage return, then use GetValue() to extract a single line. I'm having a little trouble understanding the required calculation. Obviously my calculation must differ from the OP's solution because I have multiple words either side of " - ". In the original solution above what do the multiple "1" values denote?
comment Posted February 21, 2011 Posted February 21, 2011 I have multiple words either side of " - ". It doesn't matter. I suggest you read the help on the Position() function (at least).
Recommended Posts
This topic is 5117 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