Search when Enter key is pressed
Application Type
Traditional Web

Hi,

I want to know how to trigger a screen action defined for a button when Enter key is pressed. I have multiple buttons for other input fields on the screen and I want to enable this feature for all this buttons.

For single button I had set the Is Default property to True and it was working for that button. But I need this for other buutons on the screen as well when the input field is changed

Can anyone please help me here.

Hi Kaustubh,

check this topic with some possible solutions for your scenario:

https://www.outsystems.com/forums/discussion/2608/how-to-go-to-an-action-on-pressing-enter/

Regards

Hi,

Thank you for the quick reply but this post is for single screen single button. I have multiple buttons on the screen and facing issue for that. we can only set one button to IsDefault property as TRUE on one screen.

To deal with so many buttons you need javascript on each input to point to a specific widget when enter key is pressed.

This topic is more specific to your problem:

https://www.outsystems.com/forums/discussion/58952/want-enter-key-to-go-to-a-specific-action-per-input-box/

Hi @Kaustubh Kamble ,

Create a new button into your form with the name of EnterAll and create an action for the button. Make the visible property to 'False' for that button and Change 'Is form default' to 'Yes'.

Inside EnterAllOnclick action, call all other actions which need to be performed on clicking enter button. 


Then when you are pressing enter from form, it will execute all the multiple button actions.

Cheers

Thanks, Aadhavan S

Hi Kaustubh Kamble,
As per my knowledge, there is no direct option to achieve this. Please take a look at this chain, This might satisfy your requirement.

https://www.outsystems.com/forums/discussion/48461/changing-the-default-button-at-runtime/

Attached OML file for your reference.
Hope it helps you, Thanks.

MultiDefaultButton.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.