Set Focus on Text Input and clear out this field on Screen Load

Here's what I've tried to set focus to this field on screen load:


And here's what I've tried to clear out this text input field:


Neither of these "tries" are working.

You don't need the {{}}

That fixed the focus part, thanks! The clearing of the value without the braces still doesn't work, however.

Try SearchRosterInput.clearValue()!

Darn, that didn't work either?


Can you share more about your app? I can get it to work with a textInput and a screen load handler:

One thing to note is the Load event only triggers once per screen. If you want it to trigger every time the screen is shown, the Visible handler works for that.

I definitely want it to set the focus on this field AND clear it out everytime we open this screen.

The 1st load script sets the focus to that field (thanks for your help) and the 2nd one is the one on the screenshot. Would anything else be of any help?

Ah, you may need to use a Visible event handler if you want it to fire every time you open the screen. Load only fires once per screen ("when the screen loads").

1 Like

That did it! Changing it to VISIBLE was the answer. Thanks!