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.

Foreign Key Display

Questions related to using nuBuilder Forte.
Alohajoe5
Posts: 55
Joined: Tue Apr 16, 2019 1:32 pm

Re: Foreign Key Display

Unread post by Alohajoe5 »

I have now got the view to be "viewable" by nuBuilder. I cannot, however, seem to "Insert" a new record. IDK If this is related to this solution being a view and limited to editing only one of the tables involved per save operation.
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 11 times
Been thanked: 18 times

Re: Foreign Key Display

Unread post by Janusz »

Hi, please find enclosed the copy of the database I was making trial - and it works well on my configuration.
https://drive.google.com/open?id=1RfQjX ... UbM7s0dwdD
and some movie from settings:
https://drive.google.com/open?id=1TdcBR ... rn7FcpTYz3

Some remarks:
I use Signal_1 as column name not Signal for which I received a worning that this name is restricted by DB.

When using different databases on one browser - make sure the after closing one database and opening the new one you need to fully close all the browser windows - otherwise some data are kept in browser and behaviour can be strange.

For Import / Export operations with phpmyadmin - keep in mind that it woks up to 2MB - so it's better to practise from the beginning saving by DB directly for example on linux I use following (just any exaple):

Code: Select all

to export
mysqldump --events -u root -pyourpsw CTbaza > /root/temp/CTbazacopy.sql

to import
mysql -u root -p....... -e "DROP DATABASE CTbaza;CREATE DATABASE CTbaza;GRANT ALL PRIVILEGES ON CTbaza.* TO 'globeadmin'@'%';"
mysql -u root -p...... CTbaza < /root/temp/CTbazacopy.sql
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 11 times
Been thanked: 18 times

Re: Foreign Key Display

Unread post by Janusz »

Addionally I check - so this view is working for modification (one table per save operation) - but with that you can not add record.
I my databases when I want to add record I am always working directly with form linked to table (never view) - maybe sometimes it would be possible - but personally I prefer not.

You can find example how it can be done - just one post belowe - I sent few days ago to Ingar.
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 11 times
Been thanked: 18 times

Re: Foreign Key Display

Unread post by Janusz »

or just quick example how can be done for your case
https://drive.google.com/open?id=1XQgcl ... _bCdaAv7Xm
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 11 times
Been thanked: 18 times

Re: Foreign Key Display

Unread post by Janusz »

and with the view I can see - it can be used as well - with no issue - pay attention to table and view settings.
Make sure that in DB all the field are set to allow saving in case of empty fields (set null fro example)

https://drive.google.com/open?id=12P-DL ... ykbUhROnhJ
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 11 times
Been thanked: 18 times

Re: Foreign Key Display

Unread post by Janusz »

If you like nuBuilder, please leave a review on SourceForge
Alohajoe5
Posts: 55
Joined: Tue Apr 16, 2019 1:32 pm

Re: Foreign Key Display

Unread post by Alohajoe5 »

Janusz,

Thank you for the help. I'm still trying to get the display working with a proper join instead of a view. I'm treating the view as a backup--I've got one up and working like you've described, but the drawback being the inability to insert necessitates having that second form setup for inserting & editing. I also discounted 'denormalizing' the data. I'm going to try to see what other ways I can affect a join and see if we can't get nuBuilder to 'like' the SQL. That's my project for today. I'll keep you posted.
Post Reply