Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

default value for lookup

Questions related to using nuBuilder Forte.
Post Reply
marc
Posts: 92
Joined: Mon May 14, 2018 3:26 pm

default value for lookup

Unread post by marc »

Hi,

I can't seem to select a default value for a lookup object upon loading the edit screen.

This is my attempt, to set a value but it does not work. 5afaa13eb523846 is the primary key of the record on the lookup form.

Code: Select all

$('#user_idcode').val('5afaa13eb523846').change();
Note that I can't take the code or description as they are not unique!

Can anyone help with this? Is it possible? Thanks!
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: default value for lookup

Unread post by admin »

marc
Posts: 92
Joined: Mon May 14, 2018 3:26 pm

Re: default value for lookup

Unread post by marc »

admin wrote:marc,

Try this...

https://wiki.nubuilder.cloud/ ... etLookupId


Steven
Is this the primary key of the lookup table?
string1 = Primary Key
What is a primary key of an object?
string2 = Primary Key of Lookup Object to populate
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: default value for lookup

Unread post by toms »

string2 is the object id (id attribute of the html element) of the lookup object.
I think the description is confusing on the wiki.
marc
Posts: 92
Joined: Mon May 14, 2018 3:26 pm

Re: default value for lookup

Unread post by marc »

Toms,

Thanks you for clarifying! The information is not clear on the wiki.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: default value for lookup

Unread post by admin »

.
Post Reply