manually changing a lookup field

Questions related to using nuBuilder Forte.

manually changing a lookup field

Postby alf1976 » Sun Jan 28, 2018 9:23 pm

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
alf1976
 
Posts: 75
Joined: Wed Dec 27, 2017 5:28 am

Re: manually changing a lookup field

Postby admin » Mon Jan 29, 2018 3:39 am

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
admin
Site Admin
 
Posts: 3157
Joined: Mon Jun 15, 2009 9:53 am

Re: manually changing a lookup field

Postby alf1976 » Mon Jan 29, 2018 5:30 am

Hi Steven,

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

many thanks

Andrew
alf1976
 
Posts: 75
Joined: Wed Dec 27, 2017 5:28 am

Re: manually changing a lookup field

Postby admin » Mon Jan 29, 2018 6:47 am

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


Return to General