Jump to content

Return Graphic File Name


gdellaiera

Recommended Posts

Hi, I'm trying to return a file name from a graphic upload and I'm not sure where to start with this. Ideally, I'd like to just create a blank rule that says if Field (x) = "", return ""; else return "uploaded file name only" (not the image, as this will be in the graphic frame.

 

Is this something doable?

Link to comment
Share on other sites

You should just be able to return the entire field value from a Graphic rule and assign that rule's name to your graphic frame.

 

That said, if you really do need just the file name, you can use the GetFileName function:

return GetFileName(Field("YourFieldName"));

Link to comment
Share on other sites

Dan, I've got the images showing up, but since there are multiple images in the template, the shop guys would like a page that names locations and which file goes with it.

I need to know more about the context in which this job is running. In your original post, you say, "I'm trying to return a file name from a graphic upload." What do you mean exactly by a graphic upload? Upload to what? Is this from a web form? If so, in what web application? MarcomCentral? EFI Digital StoreFront? Some other web app? Or something else?

 

Also, what do you mean by "names locations?"

Link to comment
Share on other sites

Dan, I'm running the template in WebCRD for garment printing. Its got 3 pages, the first 2 contain a variety of image locations. The third page purely is to label which location gets which file. Just looking to grab and write down data.

 

Your advice worked perfectly for what I was looking to do and its doing just what I need.

 

return GetFileName(Field("YourFieldName"));

 

Thanks for the help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...