Default filter for browse on Lookup?

Default filter for browse on Lookup?

Postby erickge » Sun Feb 05, 2017 3:15 pm

As my application grows the number of rows returned on a lookup grows. It would help if there was a way to put in a default filter similar to the Button control.
One way I was thinking of doing this is to use jQuery to put a value in the search input field. Does anyone know the name of the field, or is there a better way to do this?
2017-02-04_23-37-16.jpg
2017-02-04_23-37-16.jpg (15.41 KiB) Viewed 4256 times

Thanks!
erickge
 
Posts: 6
Joined: Tue Dec 22, 2015 5:38 am

Re: Default filter for browse on Lookup?

Postby admin » Mon Feb 06, 2017 9:18 am

admin
Site Admin
 
Posts: 3077
Joined: Mon Jun 15, 2009 9:53 am

Re: Default filter for browse on Lookup?

Postby erickge » Tue Feb 07, 2017 1:39 am

Thanks for the reply Steven, yes I have read the wiki for the button tab but I don't see how it helps me in this situation. I need the functionality of the Lookup tab along with the ability of entering a default filter for browse similar to the button tab.
Thanks
erickge
 
Posts: 6
Joined: Tue Dec 22, 2015 5:38 am

Re: Default filter for browse on Lookup?

Postby erickge » Fri Feb 10, 2017 2:54 pm

I found a solution but it is not very elegant. In forum entry
viewtopic.php?f=13&t=8883&p=14281&hilit=search+field+name&sid=34098e4d6bdb63ee4bdb5852009b868a#p14281
it was revealed that nuSearchField is the name of the "green" search field and I found that the search button is called nuSearchButton. So I put
$('#nuSearchField').val('Data to search for');
$('#nuSearchButton').click();
in a nuLoadBrowse function of a Lookup tab and it works. You have to put in logic to make sure that the function does not go into a loop.
erickge
 
Posts: 6
Joined: Tue Dec 22, 2015 5:38 am

Re: Default filter for browse on Lookup?

Postby admin » Thu Feb 23, 2017 4:50 am

.
admin
Site Admin
 
Posts: 3077
Joined: Mon Jun 15, 2009 9:53 am


Return to Custom Code