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.

Define Field By Variable?

Featured Replies

After much searching I can't find a way to make this happen.....Is it possible?

$FieldName = "Customer Name"

Set Field $FieldName "Joe Blow"

Thanks,

Mel

Hi Mel,

Yes. Check out FM Help on 'Set Variable script step.' A variable is not a field so this won't work (as you've requested): Set Field $FieldName "Joe Blow"

You pass a value to a variable (such as from a field like CustomerName) with: Set Variable [ $CustomerName ; Value: CustomerNameField ]. Later in the script when you want to use that information, such as after jumping to a related table (or any table), script would use that variable such as: Set Field [ CustomerNameField ; $CustomerName ].

If this doesn't cover what you need, you'll need to explain how you want to use it. Your example doesn't provide enough information.

LaRetta :wink2:

  • Author

Thanks Laretta.

I was hoping that FMP8 would somehow be able to extract the field name from the variable so I could set the field dynamically. Guess not.

BTW...

You've grown fur and are now wearing glasses.

Everything OK?

Well, Mel, there is only one way to set a field dynamically and that is to Freeze Window and go to layout in which the fields reside and loop through them, testing each field as you go. The ability to specify a field via calculation, variable or global is something we all wish for and maybe vs. 9 will allow it. :wink2:

This hairless pink cat adds intelligence to my look, don't you think? :smile2:

Besides, he tickles me ...

  • Author

It sure would save allot of key punching and the wear and tear on the 'ol grey cells!

Thanks for the help!

Mel

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.