Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Launch Lookup Form from Button?

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
pmjd
Posts: 132
Joined: Fri Mar 12, 2021 10:38 am
Has thanked: 3 times
Been thanked: 1 time

Launch Lookup Form from Button?

Unread post by pmjd »

Hello,

Is there a way to launch a Lookup/Lookup Form from a button instead of the standard field with the magnifying glass? So instead of entering text and searching, the button launches the Lookup's defined form and allows something to be selected from there.

Can't see an obvious way to do it with the Run object as it will nly open the browse forms and not the lookup function, nor a procedure as it's for php. Is there a built in JS function that can do this?

Thanks,
Paul
kev1n
nuBuilder Team
Posts: 4304
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Launch Lookup Form from Button?

Unread post by kev1n »

Use a Lookup Object and set it invisible. Then add a button to your form with an onclick event in the Custom Code having this JS:

Code: Select all

$('#OBJ_IDbutton').click();
Replace OBJ_ID with the Object Id of your Lookup Object.
pmjd
Posts: 132
Joined: Fri Mar 12, 2021 10:38 am
Has thanked: 3 times
Been thanked: 1 time

Re: Launch Lookup Form from Button?

Unread post by pmjd »

Great, looks perfectly
Post Reply