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.

Featured Replies

I'm trying to populate a global key field with a list of values. The global key field - when populated - will, in turn, populate a portal.

I am passing parameters when the script is activated (clicking a button in a portal). I am passing two parameters:

1. Source field: the name of a field in a related table which has the values.

2. Target field: the name of the global key field to be populated.

I am passing these as strings, not the field content.

Once in the script, I declare these parameters as variables:

$_sourceField

$_targetField

The parameters pass fine and the variables are properly set with the names of the fields.

Since I am moving around in a portal, I cannot grab the values until I have landed on a different record in the portal, so I need to gather the actual data inside the script. So, in the script, once I have landed on a particular record in the portal and have committed the records, I declare another variable:

$_sourceValues; Value: List ( $_sourceField ).

What I would like to do next is use Set Field By Name -

Set Field By Name [$_targetField ; $sourceValues]

However, the content of $_sourceValues is not a list of values. Instead, it shows in the Data Viewer as a question mark (?).

I have tied these two (after $_sourceField has been initially declared):)

$_sourceField; Value: GetFieldName ( $_sourceField ) and

$_sourceField; Value: Evaluate ( GetFieldName ( $_sourceField ) )

but $_sourceValues still comes out as "?".

I am thinking that the List () function cannot accept variables. Is this correct? Or, am I missing something in my script/parameters?

Thanks.

The List() function expects a reference to a field - not a string containing the field's name. The difference is not always obvious in Filemaker, but if your source field is Child::Value then:

List ( $_sourceField )




evaluates to:




List ( "Child::Value" )




and this in turn produces error 106 "Table is missing". 







Try:




List ( GetField ( $_sourceField ) )




or:




Evaluate ( "List ( " & $_sourceField & " )" )

  • Author

Try:

List ( GetField ( $_sourceField ) )




or:




Evaluate ( "List ( " & $_sourceField & " )" )

Thanks, comment. I thought I was probably passing a string, but I didn't know how to turn it back to the field reference. Both of your examples work great.

Thanks again.

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.