App Studio: Event trigger for search field when value is manually entered

Hopefully this is an easy one.

Creating a dashboard which includes a customer search. Done, works. No issue.

I also want the user to be able to type in a CustID (instead of requiring the search). I can do this with an on-blur event… works. BUT… this field is in focus when the screen loads. If I click off of it, I get an error/prompt because my on-blur event fires before a value is defined.

How does one allow for a user-entered value in a search field? Perhaps the on-blur is the way to go, but I need a condition to check for undefined values?

Can you add a condition at the beginning of your onBlur event that checks for empty ('') or null ('undefined')? … if false, then do the rest of your actions

That field should have a binding so you should be able to use the field updated event instead of on blur

Much like classic drive events off data not controls

5 Likes

Are your Advanced selections for Drop Down Style = DropDown and Allow Custom = false?

Not a drop down… just a text field.

image

1 Like

Sorry, that took me a while to test. I got it set up and things were going crazy… ended up wiping out my whole dashboard and rebuilding… now works like a charm. Must’ve gotten corrupted somewhere along the line.

Appreciate the quick help!

2 Likes