Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Subform customization
-
- Posts: 41
- Joined: Mon Jan 18, 2016 3:01 pm
Subform customization
Hi,
I am struggling with the subforms. Is it possible to only use it as a lookup? I tried to make it "Read Only":
and I found the option "Addable" and "Deleteable":
but I see no difference and are still able to change the field content.
Furthermore I tried to change the layout of the subform. "Tab", "Col", Ord", "Top" and "Left" seems to be the right adjusting options. I thought it might be possible to display one dataset in multiple rows, like it is possible in the report builder. It did not work:
I am missing the description of the subforms in the wiki. This is what I found something about the Wizard: http://wiki.nubuilder.net/nubuilderv3/i ... orm_Wizard
eg: Where to change the "Width" after closing the Subform Wizard?
I hope to get some help!
Thank you,
Timo
I am struggling with the subforms. Is it possible to only use it as a lookup? I tried to make it "Read Only":
and I found the option "Addable" and "Deleteable":
but I see no difference and are still able to change the field content.
Furthermore I tried to change the layout of the subform. "Tab", "Col", Ord", "Top" and "Left" seems to be the right adjusting options. I thought it might be possible to display one dataset in multiple rows, like it is possible in the report builder. It did not work:
I am missing the description of the subforms in the wiki. This is what I found something about the Wizard: http://wiki.nubuilder.net/nubuilderv3/i ... orm_Wizard
eg: Where to change the "Width" after closing the Subform Wizard?
I hope to get some help!
Thank you,
Timo
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Subform customization
Timo,
What do you mean by this?
Steven
What do you mean by this?
I am struggling with the subforms. Is it possible to only use it as a lookup?
You could try this..I thought it might be possible to display one dataset in multiple rows
Did you see this? http://wiki.nubuilder.net/nubuilderv3/i ... ubform_TabI am missing the description of the subforms in the wiki.
Steven
-
- Posts: 41
- Joined: Mon Jan 18, 2016 3:01 pm
Re: Subform customization
Great! Thank you so much Steven!
This is exactly what I wanted!
Thank you also for the "Next Button" reply!
I have one last question (so far): How to do the inner join to the zzzsys_user table? (http://forums.nubuilder.cloud/viewtopic.php?f=13&t=8866)
Greetings, have a nice weekend and thank you so much for this great piece of software!
Timo
This is exactly what I wanted!
Thank you also for the "Next Button" reply!
I have one last question (so far): How to do the inner join to the zzzsys_user table? (http://forums.nubuilder.cloud/viewtopic.php?f=13&t=8866)
Greetings, have a nice weekend and thank you so much for this great piece of software!
Timo
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Subform customization
Ion2,
Inner joins join 2 or more tables together to create the relation in a relational database, a standard part of SQL http://www.w3schools.com/sql/sql_join_inner.asp
(There is always something new to learn.)
Steven
Inner joins join 2 or more tables together to create the relation in a relational database, a standard part of SQL http://www.w3schools.com/sql/sql_join_inner.asp
Code: Select all
SELECT * FROM zzzzsys_object
JOIN zzzzsys_form ON zzzzsys_form_id = sob_all_zzzzsys_form_id
Steven
-
- Posts: 41
- Joined: Mon Jan 18, 2016 3:01 pm
Re: Subform customization
Dear Steven
I still didn't get it. I know JOINs, but do not know how to integrate them in this case. The reason might be that SQL is new to me, but I am willing to learn.
Let me explain the issue. These columns track the changes in the table (great nuBuilder feature)
Can I integrate the SELECT/JOIN statement in the Browse Column Display? Can I integrate it in the Display Condition of the Form Object? I very much hope to get a solution for that.
Thank you very much,
Timo
I still didn't get it. I know JOINs, but do not know how to integrate them in this case. The reason might be that SQL is new to me, but I am willing to learn.
Let me explain the issue. These columns track the changes in the table (great nuBuilder feature)
- zzzsys_user_log_added_by
- zzzsys_user_log_changed_by
- zzzsys_user_log_viewed_by
Can I integrate the SELECT/JOIN statement in the Browse Column Display? Can I integrate it in the Display Condition of the Form Object? I very much hope to get a solution for that.
Thank you very much,
Timo
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Subform customization
Timo,
Sorry but its not my job to teach you SQL.
Part of your problem is that for someone that doesn't know SQL you are trying to do a lot.
Start with something simpler with just a couple of tables, and once you've worked that out try something harder.
Steven
Sorry but its not my job to teach you SQL.
Part of your problem is that for someone that doesn't know SQL you are trying to do a lot.
Start with something simpler with just a couple of tables, and once you've worked that out try something harder.
Steven
-
- Posts: 41
- Joined: Mon Jan 18, 2016 3:01 pm
Re: Subform customization
Dear Steven,
this was a drastic answer. Of course it is not your job to teach me SQL. What I am saying is just that the "inner join" recommendation you gave (http://forums.nubuilder.cloud/viewtopic.php?f=13&t=8866) might not be the correct relation on the form level because there is no 1to1 relation between them. You have three columns in one table that link to different rows in the zzzsys_user table:
An alternative might be to write the sus_name in my table "Before Save" (in Custom Code). I just believe this is not most clever method.
I am very grateful for nuBuilder. I think it is a great product.
Timo
this was a drastic answer. Of course it is not your job to teach me SQL. What I am saying is just that the "inner join" recommendation you gave (http://forums.nubuilder.cloud/viewtopic.php?f=13&t=8866) might not be the correct relation on the form level because there is no 1to1 relation between them. You have three columns in one table that link to different rows in the zzzsys_user table:
- zzzsys_user_log_added_by
- zzzsys_user_log_changed_by
- zzzsys_user_log_viewed_by
An alternative might be to write the sus_name in my table "Before Save" (in Custom Code). I just believe this is not most clever method.
I am very grateful for nuBuilder. I think it is a great product.
Timo
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Subform customization
Timo,
To get the names from zzzsys_user_log_added_by, zzzsys_user_log_changed_by and zzzsys_user_log_viewed_by, you need to inner join to the zzzsys_user table 3 times using aliases.
Steven
To get the names from zzzsys_user_log_added_by, zzzsys_user_log_changed_by and zzzsys_user_log_viewed_by, you need to inner join to the zzzsys_user table 3 times using aliases.
Steven
-
- Posts: 41
- Joined: Mon Jan 18, 2016 3:01 pm
Re: Subform customization
Steven,
got the hint! This is working in PHP MyAdmin:
The output is a table with all my inventory columns and at the end it adds two columns named log_added_by_name and log_changed_by_name.
By useing this SELECT STATEMENT in the Form and calling log_added_by_name in the Browse Column gives the following error message:
Do you have a small hint for that?
Also on the details page I was not lucky. Might "Display On" be the issue?
Thank you,
Timo
got the hint! This is working in PHP MyAdmin:
Code: Select all
SELECT inv.*
, zu1.sus_name AS log_added_by_name
, zu2.sus_name AS log_changed_by_name
FROM inventory inv
LEFT JOIN zzzsys_user zu1
ON inv.inventory_log_added_by = zu1.zzzsys_user_id
LEFT JOIN zzzsys_user zu2
ON inv.inventory_log_changed_by = zu2.zzzsys_user_id
By useing this SELECT STATEMENT in the Form and calling log_added_by_name in the Browse Column gives the following error message:
Do you have a small hint for that?
Also on the details page I was not lucky. Might "Display On" be the issue?
Thank you,
Timo
-
- Posts: 41
- Joined: Mon Jan 18, 2016 3:01 pm
Re: Subform customization
Small update:
By using the following code it is possible to display log_changed_by_name in the Browse Columns:
Still I didn't find a solution to display log_changed_by_name on the Details page.
Any ideas?
Thank you,
Timo
By using the following code it is possible to display log_changed_by_name in the Browse Columns:
Code: Select all
SELECT inv.*
, log_added_by_name
, log_changed_by_name
FROM inventory inv
LEFT JOIN (SELECT zzzsys_user_id, sus_name AS log_added_by_name FROM zzzsys_user) zu1
ON inv.inventory_log_added_by = zu1.zzzsys_user_id
LEFT JOIN (SELECT zzzsys_user_id, sus_name AS log_changed_by_name FROM zzzsys_user) zu2
ON inv.inventory_log_changed_by = zu2.zzzsys_user_id
Any ideas?
Thank you,
Timo