hello and thank you to accept me in this forum.
I'm an IT guy but not a programmer. I managed in the past to program things in C, JavaScript and a little bit of php. I understand things quickly.
I'm trying Nubuilder since a week (few hours spent on it)
Built a task database: OK
I want to lookup into another database (companies) and display info from it: acronym, company name and phone to inject into my task database.
I set a lookup field and found the related company field (company_acronym)
When I add a new field into my task database, I see the looking glass, can browse through the company database (so the lookup is ok) and I'm allowed to choose an acronym
however, when displayed, the acronym isn't displayed, but instead I have a list of numbers and letter (but consistent with the acronym names)
What's my error here ? I tried to change several parameters but no luck for now.
Additionnaly, I want to display on the same task database, related info (company_phone and company_name). If I choose lookup for those fields, nothing to search but I just want a related display, not search again.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
newbie - v4.5 lookup into another file - display
-
- Posts: 17
- Joined: Wed Aug 11, 2021 7:11 pm
newbie - v4.5 lookup into another file - display
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: newbie - v4.5 lookup into another file - display
Hi Mike,
Lookups are made up of three components:
1. The ID which is the foreign key on the child table
2. The Code Field on the parent table
3. The Description Field on the parent table
Note: The value of foreign keys are not displayed to End Users, End Users only need to see the Code and Description components of a Lookup
--> What you enter in the Code and Description field is displayed.
You can use the nuSetFormValue() function in the After Save PHP-Event to update other objects on your Edit Form after a Lookup value is chosen: https://forums.nubuilder.cloud/viewtopic. ... 85&p=15187
Lookups are made up of three components:
1. The ID which is the foreign key on the child table
2. The Code Field on the parent table
3. The Description Field on the parent table
Note: The value of foreign keys are not displayed to End Users, End Users only need to see the Code and Description components of a Lookup
--> What you enter in the Code and Description field is displayed.
You can use the nuSetFormValue() function in the After Save PHP-Event to update other objects on your Edit Form after a Lookup value is chosen: https://forums.nubuilder.cloud/viewtopic. ... 85&p=15187
You do not have the required permissions to view the files attached to this post.
-
- Posts: 17
- Joined: Wed Aug 11, 2021 7:11 pm
Re: newbie - v4.5 lookup into another file - display
Thank you for your reply but I think I made it right. See my companies db and the lookup code
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: newbie - v4.5 lookup into another file - display
Doesn't the company acronym cointain a cryptic value?
This is what you have chosen and is displayed.
If you want someting else to be shown, enter other fielfs in code/description. It could also be that I don't fully undertand what you are trying to achieve
This is what you have chosen and is displayed.
If you want someting else to be shown, enter other fielfs in code/description. It could also be that I don't fully undertand what you are trying to achieve
-
- Posts: 17
- Joined: Wed Aug 11, 2021 7:11 pm
Re: newbie - v4.5 lookup into another file - display
I want to add a task for a technician
when adding a task, I need to put the calling company + other info
First tests here:
created a company: acronym / company name / company phone
created a lookup form: I need to add a company (retrieved through the lookup), keep that info and add the related info (company name)
companies management, I'm adding a company: I checked, the company is added: Now, I want to lookup (search the acronym), display the acronym and the company name and keep it in my lookup form Is my explanation better ?
when adding a task, I need to put the calling company + other info
First tests here:
created a company: acronym / company name / company phone
created a lookup form: I need to add a company (retrieved through the lookup), keep that info and add the related info (company name)
companies management, I'm adding a company: I checked, the company is added: Now, I want to lookup (search the acronym), display the acronym and the company name and keep it in my lookup form Is my explanation better ?
You do not have the required permissions to view the files attached to this post.
Re: newbie - v4.5 lookup into another file - display
Mike1961,
Have you seen these videos?
They are a little out of date but still explain why and how to use Lookup Objects...
https://www.youtube.com/watch?v=QzIuQqb ... H&index=11
https://www.youtube.com/watch?v=Qf_Vtmw ... H&index=12
Steven
Have you seen these videos?
They are a little out of date but still explain why and how to use Lookup Objects...
https://www.youtube.com/watch?v=QzIuQqb ... H&index=11
https://www.youtube.com/watch?v=Qf_Vtmw ... H&index=12
Steven
A short post is a good post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: newbie - v4.5 lookup into another file - display
I think this is what you are looking for (see my first answer above)
You can use the nuSetFormValue() function in the After Save PHP-Event to update other objects on your Edit Form after a Lookup value is chosen: https://forums.nubuilder.cloud/viewtopic. ... 85&p=15187
-
- Posts: 17
- Joined: Wed Aug 11, 2021 7:11 pm
Re: newbie - v4.5 lookup into another file - display
Thank you for pointing (again) where I need to go !
Created a new form and applied your comments. Result is OK except few things (not related): date format and decimals.
Date: when I add values into a form and choose today, I obtain the dd-mm-yy format. However, when displayed I obtain the yy-mm-dd format
For NuNumbers, even I choose a custom format (1000), without decimals, I have always a display with decimals
But the main feature for that post, the lookup, is now well understood !
*update*:
If I add a line into the DB, the lookup is fine: it's empty and I have to click on the looking glass to browse through my companies acronyms, select it and the related data are inserted.
However, when I want to update a line I created before, I obtain all the data except the acronym (empty) and I need to click again to choose an acronym
is it a way to keep this acronym (I suppose yes) ?
Created a new form and applied your comments. Result is OK except few things (not related): date format and decimals.
Date: when I add values into a form and choose today, I obtain the dd-mm-yy format. However, when displayed I obtain the yy-mm-dd format
For NuNumbers, even I choose a custom format (1000), without decimals, I have always a display with decimals
But the main feature for that post, the lookup, is now well understood !
*update*:
If I add a line into the DB, the lookup is fine: it's empty and I have to click on the looking glass to browse through my companies acronyms, select it and the related data are inserted.
However, when I want to update a line I created before, I obtain all the data except the acronym (empty) and I need to click again to choose an acronym
is it a way to keep this acronym (I suppose yes) ?
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: newbie - v4.5 lookup into another file - display
Is the proper date format set?
Use the Input tab to set the format, not the calc tab,For NuNumbers, even I choose a custom format (1000), without decimals, I have always a display with decimals
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: newbie - v4.5 lookup into another file - display
Could you record what you are doing with a screen recorder and thenIf I add a line into the DB, the lookup is fine: it's empty and I have to click on the looking glass to browse through my companies acronyms, select it and the related data are inserted.
However, when I want to update a line I created before, I obtain all the data except the acronym (empty) and I need to click again to choose an acronym
is it a way to keep this acronym (I suppose yes) ?
upload the output e.g. here?