Jump 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.

Naming an Export Container Field file

Featured Replies

06-01-10 04:41 PM - Post#40777

First of all, my apologies for being dense about this, but I am just not getting it right. I’m pretty sure the answer is easy and obvious (just not to me).

I have a layout with:

1. A container field with a picture of a school (School address::School Picture)

2. A text field with the name of the school (School address::School Name)

I want to export the picture into a folder on my desktop and name it with the corresponding name.

I have a Set Variable script to create a variable called “$schoolName”

Set Variable: [$schoolName; Value: School address::School Name & “.jpg”]

(I created a test field and a Set Field script to make sure that the variable is working. When I run the script, it correctly populates the test field with the results of the Set Variable script—the name of the school followed by “.jpg”.)

The problem comes when I export the photo.

I’ve used the Export Field Contents command to save the photo into a folder on my desktop.

Export Field Contents [school address::School Picture; $schoolName]

The photograph exports into the folder as expected, but does not pick up the name from the variable. Instead, it gives the photo the name of the variable—$schoolName

I’ve tried putting quotes around the variable and the resulting name is—“$schoolName”

I’ve tried adding a ‘’ before the variable and the resulting name is—$schoolName

Obviously, the Export command is not seeing $schoolName as a variable, but as straight text.

Any ideas would be appreciated. Thanks.

See Help for "Creating File Paths".

You have dealt with the name of the file; but not the full path.

Set variable $path; "file:" & get( desktopPath) & $schoolname

Export field contents [ $path ]

  • Author

Thanks, BruceR.

I want to make sure I understand the logic here.

In essence, within the Set Variable script, I need to not only define the variable, but also specify where the target file will be end up on my computer?

Is that correct?

  • Author

Got it!

Thanks for your input. It put me on the right path (no pun intended) and I was able to find just what I needed.

Thanks, BruceR.

I want to make sure I understand the logic here.

In essence, within the Set Variable script, I need to not only define the variable, but also specify where the target file will be end up on my computer?

Is that correct?

That's a confusing way of putting it.

You can put whatever you want in a variable.

But if your purpose is to script the export of a file, then the variable used by the export action must be a complete and valid file path. How else is it going to go where you tell it to?

  • Author

This clarifies things.

How else is it going to go where you tell it to?

My export script put the photo where I wanted it to go (and gave it a name). I'd assumed it could just pick up the name from the variable. Admittedly, my logic was wrong.

Thanks again for your help. Much appreciated.

Create an account or sign in to comment

Important Information

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

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.