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.

Field Name Set

Featured Replies

Is it possible to reference field names via parameters?

For example instead of using Table::Field could one use Table:;)$$Test where $$Test would be a parameter set to the name of the field?

I tried it and it does not work, is there a different way to achieve that or does it just not work?

I really do not have / need to use it but am just wondering if it can be done as it might be useful in my future projects.

Thanks.,

If I'm understand your question, and the field is called [color:blue]Test, then you Set Variable [ $$Test; YourTable:;)[color:blue]Test ]

If this isn't what you meant, let us know.

HTH

Lee

  • Author

Not exactly. The example you put would get the value of the field into the parameter, not the field name and field name is not the issue - I might have poorly explained what I wanted so I will try again.

I am thinking of using parameters to reference field name, not field value. Something like:

1. Table Name is Weight

2. Field name is Test

3. Field name is Actual_Weight

4. Optional Script Parameter is Test

5. Set Variable [$$Field; Value:Get(ScriptParameter)]

6. Set Field [Weight:;)$$Field; Weight::Actual_Weight]

If I reference field name as seen in step 6 I get message field cannot be found.

What I am thinking is using the script parameter to reference fields in calculation rather then having to use field names if possible.

Hope the explanation is a bit better this time around. If not I can try again.

Thanks.,

You can not use Set Field [] dynamically like this.

  • Author

Could it be used vice versa in any way?

Instead of

6. Set Field [Weight:;)$$Field; Weight::Actual_Weight]

like this

6. Set Field [Weight::Actual_Weight; Weight::$$Field]

Thanks.,

Edited by Guest

Maybe like this:

Set Field [ Weight::Actual_Weight ; Evaluate ( "Weight::" & $$Field ) ]

For the first thing (setting a field dynamically), you can use a plug-in such as DoSQL, or a loop on a layout until the active field name is what you want. You can also use GoTo object.

The problem with these two is that you need to be sure the field is on the layout. This is what FM xLayout Assistant does for you (delivered with a FileMaker script to set a field dynamically).

As for your second request, as Comment said, you have the Evaluate function, and even GetField, which is supposed to be a little faster.

Edited by Guest

  • Author

Thank you kindly.,

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.