Welcome to the nuBuilder Forums!

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

Subform problem - legacy db tables

Questions related to using nuBuilder Forte.
n9yty
Posts: 47
Joined: Thu Oct 15, 2020 8:43 pm

Re: Subform problem - legacy db tables

Unread post by n9yty »

I will have to make a copy of the DB and remove al the other tables except just the ones needed, and obfuscate the name information on those, as this is confidential data. That will take a little time.

What is the best way to send it to you?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Subform problem - legacy db tables

Unread post by kev1n »

Yes, please upload a minimal example (containing dummy data) here.
n9yty
Posts: 47
Joined: Thu Oct 15, 2020 8:43 pm

Re: Subform problem - legacy db tables

Unread post by n9yty »

I really appreciate your help, this one is puzzling. I will say, the more I look at what you can do with this system, the more impressed I am. I don't know how this was never on my radar before.
Last edited by n9yty on Thu Oct 22, 2020 12:21 am, edited 1 time in total.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Subform problem - legacy db tables

Unread post by kev1n »

I noticed that your subform GFT_History doesn't have any objects. With Fast Forms, they are created automatically. How did you create it?

Just try adding one object manually and the error should go away.
(Objects -> Add)

Then you can add the other objects/columns.
You do not have the required permissions to view the files attached to this post.
Last edited by kev1n on Mon Oct 19, 2020 9:38 am, edited 1 time in total.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Subform problem - legacy db tables

Unread post by Janusz »

another point to look at - is the field names in sql tables
for example primary key in every table is defined as "rowid"
the best is to have all table field names as unique
so for example for hstf table the best would be to use:
hstf_id
hst_gift_date
hst_id_code
hst_gift_amount
etc.
if names are not unique then some unexpected issues may happen
tables.png
You do not have the required permissions to view the files attached to this post.
If you like nuBuilder, please leave a review on SourceForge
n9yty
Posts: 47
Joined: Thu Oct 15, 2020 8:43 pm

Re: Subform problem - legacy db tables

Unread post by n9yty »

I created it several different times. I didn't know if I could use the fast builder on a pre-existing table.

I just went in and added them, if this is where you mean, but it hasn't changed anything here. Did it work for you?
Screen Shot 2020-10-19 at 2.26.02 AM.png
I don't think that is the right place, but I am looking and cannot find how to open the form to get to the objects list to add a field. Sorry for being slow. I know on the main form I get to the form object editor by opening the form

I looked in the Form Editor, but I only see the "Main", "Browse" and "Custom Code" sections.

That is probably why it didn't occur to me to add them before because I can't find them. :(

Oh, I found it! :) At least one way. I went Into the global Objects editor and attached it to the form. Now that the form is displaying I can use the other approach.

THANK YOU SO MUCH. I am so sorry for taking your time on my mistake, but I hadn't found any examples online building a system like this for existing database tables in this way. Now I know.
You do not have the required permissions to view the files attached to this post.
n9yty
Posts: 47
Joined: Thu Oct 15, 2020 8:43 pm

Re: Subform problem - legacy db tables

Unread post by n9yty »

Janusz wrote:another point to look at - is the field names in sql tables
for example primary key in every table is defined as "rowid"
the best is to have all table field names as unique
so for example for hstf table the best would be to use:
hstf_id
hst_gift_date
hst_id_code
hst_gift_amount
etc.
if names are not unique then some unexpected issues may happen
Yes, this is legacy data. But you may be right, since they are not going to be using the legacy software any longer, once it is brought into this database I should alter the tables to change the field names to things that are unique. Thanks for bringing that up.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Subform problem - legacy db tables

Unread post by kev1n »

Janusz wrote:another point to look at - is the field names in sql tables
for example primary key in every table is defined as "rowid"
the best is to have all table field names as unique
Janusz is right ( Also see https://wiki.nubuilder.net/nubuilderv3/ ... _Structure )
But is not imperative, you can still do a SELECT * FROM ( SELECT ..." should you encounter any issues.
n9yty
Posts: 47
Joined: Thu Oct 15, 2020 8:43 pm

Re: Subform problem - legacy db tables

Unread post by n9yty »

Yes, I would not design tables this way. This software dates back to the 1980's on an old UNIX platform, over the years it finally ended up on MySQL, but the schema, obviously, was never updated to anything approaching 'modern' standards. Although even then, I don't know that using the same field names in all your tables was a good idea. :)
n9yty
Posts: 47
Joined: Thu Oct 15, 2020 8:43 pm

Re: Subform problem - legacy db tables

Unread post by n9yty »

And thanks again for the excellent help and support! I'm working with it now and having great success in doing what I was trying to do. Now off to tackle all the related data, but being in the US central time zone, I think it is time for bed first. :) Kudos to you for getting me over the bump I was stuck behind!
Post Reply