Screen Customization Ideas for Retrieving a Record via Textbox Value

Hey Guys.

I have a custom UD screen with a variety of fields. The records are all loaded via DMT.

The default “canned” screen gives you a search button, which will do a standard search, but I haven’t been able to figure out how to allow a user to simply type a record ID into the textbox for Key1 and press TAB to populate the screen.

Any ideas on how to approach this?

I think your problem is that Key1 is not a complete ID.
UD records can only be identified after all 5 keys have been specified.
So… I would usually add a custom search to make user lookups easier.
e.g.
image

2 Likes

So the UD Forms already do a “validating” event on each of the 5 keys. And by default this invokes the search
However if you removed or added your own field you can also invoke that method yourself. Simply on “Validating” invoke

oTrans.ValidateKeyField(txtYourTextBox, txt1,txt2,txt3,txt4,txt5)

Where each of those txt’s are the other 5 fields (can be hidden)

Another option is you can invoke getbYid on oTrans

oTrans.GetByID(key1,key2,key3,key4,key5);
1 Like

Thanks Bruce and Jose for your assistance. I wasn’t able to get the ValidateKeyField working probably because I have a terrible success rate with this.anything, and I didn’t want to create GUIDs for all 5 keys.
Besides, having a single line is very elegant.
oTrans.GetByID(Key1.Text, "", "", "", "")