Jeffrey Bloch Posted April 23, 2022 Posted April 23, 2022 A user is in a field which displays a dropdown list and hits the 'ESC' key, thereby selecting no item from the list. I'd like to trigger a script at this point, but it seems that simply closing the dropdown list by means of the ESC key, remaining within the same field, cdoesn't fall within the functionality of any of the script triggers. Is this correct? Is there a workaround? Put in a different way, if a user hits the ESC key, opting not to select an item from the dropdown list, I want to close the popover which holds that field. Is this possible? Thanks
comment Posted April 23, 2022 Posted April 23, 2022 (edited) Try attaching an OnObjectKeystroke script trigger to the field. Then have your script do the action if: Code ( Get(TriggerKeystroke) ) = 27 --- Sorry, that won't work in your situation. Apparently when a drop-down is activated, the ESC keystroke is interpreted as a keyboard shortcut to de-activate it and not passed further to the script triggering mechanism. Edited April 23, 2022 by comment
Jeffrey Bloch Posted April 23, 2022 Author Posted April 23, 2022 I had tried a trigger on the field, as well as one on the layout. I don’t seem to be able to trap for this. Tks.
bcooney Posted April 24, 2022 Posted April 24, 2022 Maybe rethink the ux? Have them edit in a global in a popover with a save button?
bcooney Posted April 25, 2022 Posted April 25, 2022 Do you have a save button in the popover? With that you can update the actual field. If they just dismiss popover, then the field is not edited.
Jeffrey Bloch Posted April 26, 2022 Author Posted April 26, 2022 There’s no save button. I use a script trigger to perform all required actions when a value is selected into the field. Should the user decide not to select an option from the drop down list, and instead hit the ESC key, I want the popover to close. I don’t see a way to accomplish this without the user having to hit the ESC key twice.
bcooney Posted April 27, 2022 Posted April 27, 2022 I’m picturing something different. User clicks popover “edit” button next to noneditable field. Field value is set into global field using OnObjectEnter script trigger attached to popover. Global field has assigned value list. Popover save button sets global to actual field. Closing popover without clicking save does nothing.
Jeffrey Bloch Posted April 27, 2022 Author Posted April 27, 2022 Thanks, but I do all possible to limit keystrokes. I don’t want to include a button. Someone selects an entry from the list, popover closes.
Recommended Posts
This topic is 939 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