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.

Field as a button

Featured Replies

Hello,

In my table I have text fields "ABC", "DEF", "GHI".  I have these fields on a layout and have set each field as a button that runs a script.

The script needs to return the field name (GetFieldName?) and change the contents of the field based on the existing contents of the field when the button is clicked (Case function).

How do I let my script know which button (field) has been pressed?

Thanks in advance,

Ben

3 minutes ago, benmort81 said:

How do I let my script know which button (field) has been pressed?

By using the script parameter, of course. I am not sure what exactly your question is. And I suspect those text fields should really be individual records in a related table.

  • Author

Thank you.

My question is:  "What is the correct script parameter for the following..."  

GetFieldName ( TheFieldIJustClicked )

Thanks again,

Ben

You are not clicking a field, but a button - and that button has no idea what the underlying field is. You need to hard-code the field's name in each button's script parameter. To protect the parameter against future changes in the field's name, use:

GetFieldName ( fieldName )

and replace fieldName with the actual field associated with the button.

  • Author

Ok, thanks for that.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.