benmort81 Posted January 13, 2016 Posted January 13, 2016 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
comment Posted January 13, 2016 Posted January 13, 2016 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.
benmort81 Posted January 13, 2016 Author Posted January 13, 2016 Thank you. My question is: "What is the correct script parameter for the following..." GetFieldName ( TheFieldIJustClicked ) Thanks again, Ben
comment Posted January 13, 2016 Posted January 13, 2016 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. 1
Recommended Posts
This topic is 3505 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 accountSign in
Already have an account? Sign in here.
Sign In Now