Welcome to the nuBuilder Forums!

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

Can't initialize lookup in new register Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
Gerry_26
Posts: 11
Joined: Thu Jul 07, 2022 5:38 pm
Location: Guadalajara Jalisco Mexico
Has thanked: 1 time
Been thanked: 1 time

Can't initialize lookup in new register

Unread post by Gerry_26 »

Hello guys, its me again, i want to know how to initializate a lookup when i want to add a new record

Here is the register that I want to initialize:
Captura de pantalla 2022-07-21 112918.png

And here is where i want to initializate the record in a new form:
Captura de pantalla 2022-07-21 113209.png

I did it like this (nuBuilder Pro V.3)
d4750e20-5c8c-4a85-93bf-fb34a447de5d.jpg
This is the code: SELECT REPLACE('#nu_browse_filter#', 'contacto_', '')

How i can do it in this version?

Hope for your answers
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Can't initialize lookup in new register

Unread post by kev1n »

Hi,

Where is the Hash Cookie #nu_browse_filter# set?
Gerry_26
Posts: 11
Joined: Thu Jul 07, 2022 5:38 pm
Location: Guadalajara Jalisco Mexico
Has thanked: 1 time
Been thanked: 1 time

Re: Can't initialize lookup in new register

Unread post by Gerry_26 »

Thanks for your answer, i'm using this filter
Captura de pantalla 2022-07-22 091744.png
I have a detail master, and in detail I need to initialize a field with filter.

In nuBuilder Pro I have the code value by default, but in this version I can't find where to initialize it
d4750e20-5c8c-4a85-93bf-fb34a447de5d.jpg
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Can't initialize lookup in new register

Unread post by kev1n »

Does #contacto_id# contain the primary key or a string?
Gerry_26
Posts: 11
Joined: Thu Jul 07, 2022 5:38 pm
Location: Guadalajara Jalisco Mexico
Has thanked: 1 time
Been thanked: 1 time

Re: Can't initialize lookup in new register

Unread post by Gerry_26 »

Contains the primary key
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Can't initialize lookup in new register

Unread post by kev1n »

In your form's Custom Code, save the Browse filter to a window varriable:
browse.png

When the Edit form is loaded, retrieve it to populate the lookup:
edit.png
You do not have the required permissions to view the files attached to this post.
Gerry_26
Posts: 11
Joined: Thu Jul 07, 2022 5:38 pm
Location: Guadalajara Jalisco Mexico
Has thanked: 1 time
Been thanked: 1 time

Re: Can't initialize lookup in new register

Unread post by Gerry_26 »

It works!, Thanks Kev1n

Like a extra i found an issue

When i save the form, the save button enter in a loop

To solve it, is just add this code
Form_Properties_CC_Edit.png
You do not have the required permissions to view the files attached to this post.
Last edited by Gerry_26 on Fri Jul 22, 2022 6:47 pm, edited 2 times in total.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Can't initialize lookup in new register

Unread post by kev1n »

Great!
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Can't initialize lookup in new register

Unread post by kev1n »

Maybe just populate the lookup if it's a new record/ the lookup is empty.
Post Reply