Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

New FM user needs help parsing image path

Featured Replies

  • Newbies

Hi all,

I'm new to programming FM and need some assistance with parsing my image paths.

I have a Container field (Colorway Image) with an image placed in it.

I also created a calculated field using GetAsText(Colorway Image). This field returns the value:

size:504,445

image:Images/103456_comp.tif

imagemac:/Radiance/Users/jerryross/Documents/Project Files/TMaG/Footwear Supplement SS05/Images/103456_comp.tif

What I need help with is extracting the image name and location. Everything after "imagemac:"

The purpose of this is it to export the data in Tab Delimited format and then in turn inport the data into an InDesign template.

An input on the syntax needed to parse this would be great.

thanks,

JR

Define two calc fields:

(source = the field that has the result of the GetAsText function).

I've uploaded the demo file... Check the FM help file for the functions that are being used:

- MiddleValues: because GetAsText gives you a return delimited list. We want to work only with the last item in that list

- Position: gives you the position number of a character in the text string

- Patterncount: gives you the # of occurences of a charachter

- Middle and right: to extract a certain sub-string from the source string

--------------------------------------

Path =

Let(

theSource = RightValues( source; 1 );

Middle(

thesource;

Position( thesource; ":"; 1; 1 ) + 1;

(

Position( thesource; "/"; 1; PatternCount( thesource; "/" ) ) +

1

) -

Position( thesource; "/"; 1; 1 )

)

)

--------------------------------

Filename =

Let(

theSource = Substitute( RightValues( source; 1 ); "

ExtractPathImage.zip

  • Author
  • Newbies

Thanks! This formula works great. I would have taken me hours to figure that out.

jr

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.