Welcome to the nuBuilder Forums!

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

manually changing a lookup field

Questions related to using nuBuilder Forte.
Locked
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

manually changing a lookup field

Unread post by alf1976 »

How do you manually change the value of a lookup object in version 4?

In version 3 i was able to use
$('#EstimateSiteID').val('4');
$('#EstimateSiteID').change();

this doesn't work in version 4.

As the change is triggered by the result of another lookup object i tried using the nulookupRecord and SetFormValue in the afterbrowse but that didnt work either on the lookup object

Andrew
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: manually changing a lookup field

Unread post by admin »

Andrew,

I have just made a change to Github that should now allow...

Code: Select all


$('#EstimateSiteID').val('4');          //-- 4 is a primary key
$('#EstimateSiteID').change();

Please test it for me.

Steven
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: manually changing a lookup field

Unread post by alf1976 »

Hi Steven,

Seems to work fine. Like the way it fires the after browse event too upon the manual change.

many thanks

Andrew
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: manually changing a lookup field

Unread post by admin »

.
Locked