Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a dropdown that I'd like to be able to change with the arrow keys, then you press enter, it commits the value, and runs the script. Instead, when I press enter, it uses whatever the value was before I chose a new one in the dropdown, and runs the script. The script adds a line item at the end of an invoice portal, currently with the wrong value (unless I click, but I'm trying to get around using the mouse).

I'm sure there's something simple I'm missing here? The following script runs on keystroke:


if(get(triggerkeystroke)="paragraph (symbol)")

Commit records/Requests [No dialog]

Perform Script ["allocate]

Exit Script [result: False]

So, to summarize, I want "enter" or "return" to commit the field and run the script.

Posted

See if this article helps you.

http://sixfriedrice.com/wp/script-triggers-using-the-keystroke-trigger/

Posted

I have a dropdown that I'd like to be able to change with the arrow keys, then you press enter, it commits the value, and runs the script. Instead, when I press enter, it uses whatever the value was before I chose a new one in the dropdown, and runs the script. The script adds a line item at the end of an invoice portal, currently with the wrong value (unless I click, but I'm trying to get around using the mouse).

I'm sure there's something simple I'm missing here? The following script runs on keystroke:


if(get(triggerkeystroke)="paragraph (symbol)")

Commit records/Requests [No dialog]

Perform Script ["allocate]

Exit Script [result: False]

So, to summarize, I want "enter" or "return" to commit the field and run the script.

The script is exiting with "false" which tells FMP to reverse the change. Try it with "true".

Posted

Thanks for your replies,

The article is useful, but it's a different application of keystrokes. I think I used exit script [result:false] incorrectly, but that's as much as I can glean.

I tried the exit script [result: true], and it's the same issue, that it doesn't commit the change. I think the problem is that the allocate script goes to a different layout, at which point the selected text in the dropdown is cleared, so by the time exit script [result:false] runs, the field is already cleared.

I could have the allocate script run in a new window, which might fix that, but I'd prefer not to alter that script, since it's long, complicated, and not something I created.

Any further thoughts?

This topic is 4568 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.