Jump to content

This topic is 3019 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

This topic is 3019 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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