Newbies frankie Posted August 24, 2010 Newbies Posted August 24, 2010 Hi I have a Filemaker 8.5 database that among other things I use to import images into container fields. I have a text field "PathName" for the path to the imported image and a text field "FileName" for the file name of the imported image. I am trying to create a calculation to extract some of the text from "PathName" which is never the same number of words or letters from the left or right - so I can't use the LeftWords or RightWords functions. But if I could subtract "FileName" from "PathName" I would be left with a constant where I could use RightWords to get the info I need. Is this possible (or is there another easier way to do it) Examples of the text are as follows: PathName: file://XServe_Archive/Reference Files/Archive 08_01 /AATGI_Identity Badges 2008_3712/Badges reverse.pdf FileName: Badges reverse.pdf Info I need to extract: 3712 PathName: file://XServe_Archive/Reference Files/Archive 08_01 /Expo_On the Water PDF ticket_3744/On The Water Boat Club Ticket.pdf FileName: On The Water Boat Club Ticket.pdf Info I need to extract: 3744 As you can see, the info I need to extract is the number directly before the "FileName" in "PathName" (without the '/') Any help would be really appreciated Thanks Frank
Raybaudi Posted August 24, 2010 Posted August 24, 2010 Hi try this calculation: Let([ p = Substitute ( PathName ; "/" ; ¶ ) ; t = GetValue ( p ; ValueCount ( p ) - 1 ) ]; RightWords ( t ; 1 ) ) This assumes that the number is always preceded by an underscore.
Newbies frankie Posted August 24, 2010 Author Newbies Posted August 24, 2010 Thanks a million for a really fast reply. Not sure how it works but it works perfectly. F
Recommended Posts
This topic is 5263 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