Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Problem creating new forms.

mkingston
Posts: 23
Joined: Mon Jul 27, 2009 5:54 pm

Problem creating new forms.

Unread post by mkingston »

Help!
I installed the “vanilla” nuBuilder into my own data base, which seems to have worked okay. All the nuBuilder tables are there and populated. I then added my own database to the “db” folder of nuBuilder and modified the php code to access it. This all seems to work well. I can start up the nuBuilder environment and it does point properly to my database. The tables in my database are already populated with test data.
I have attempted to create my own forms for my own database, following the example in the first tutorial on creating basic forms. I created a selection list, using the “INDEX” form, with a button object that launches a new form, MSS1000.
The new form, MSS1000, includes two text objects, cust_acct_type and cust_acct_desc, which are in the table MSCTP100 (a table in my own database).
When I refresh, the button I added to launch my form (MSS1000) works and the form appears and is populated with the data from my table (MSCTP100). Please see attachment MSS1000withdata.jpg. However, when a line to select it, the form is displayed without the data to be deleted. Please see attachment SelectedBlank.jpg.
Also, if I press the “Add” button the unpopulated form is display. I enter data into the form fields and press “Save”, but the record has not been saved into my table (MSCTP100).
I have also attached screen shots of the nuBuilder screens used to create the form and various objects. What am I leaving out or doing wrong?

I tried to attach the screen shots, but the zip file is too large, 538K. Do you have an alternative for sending them?

Thanks,

Merrill
michael
Posts: 40
Joined: Mon Jun 15, 2009 9:50 am

Re: Problem creating new forms.

Unread post by michael »

Merrill,

I've just changed the forum attachment settings to allow files up to 1MB in size so you can attach the screenshots. If you ever need to attach files which are larger, just send them to forums@nubuilder.com and I will attach them manually to your post as soon as I can.

The screenshots would help a lot with this issue, but I'm thinking it's most likely something to do with the form configuration. Do you see any error messages when you save after clicking Add?

Michael
mkingston
Posts: 23
Joined: Mon Jul 27, 2009 5:54 pm

Re: Problem creating new forms.

Unread post by mkingston »

Michael,

No, there are no error messages at all. I'm attaching a zip file with all the screen shots.

Thanks,

Merrill
Attachments
screenshots.zip
(531.84 KiB) Downloaded 427 times
steven
Posts: 218
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 1 time

Re: Problem creating new forms.

Unread post by steven »

Merrill,

Can we get a screen shot of The General Tab on the Form Screen,
and a dump of your table structure.
(sorry to be a pest)

Steven
If you like nuBuilder, how about leaving a nice review on SourceForge?
mkingston
Posts: 23
Joined: Mon Jul 27, 2009 5:54 pm

Re: Problem creating new forms.

Unread post by mkingston »

Steven:

Attached is an sql command file to create and load the table with data (only 3 records and the screen shot of the General Tab.

You're not being a pest. I'm happy to have the assistance. I think this is a great tool. I just need some assistance to become proficient with it.

Thanks,

Merrill
Attachments
GeneralTab.jpg
GeneralTab.jpg (51.37 KiB) Viewed 12450 times
mkingston
Posts: 23
Joined: Mon Jul 27, 2009 5:54 pm

Re: Problem creating new forms.

Unread post by mkingston »

It doesn't look like the sql command file got attached, so here it is again.

Thanks,

Merrill
steven
Posts: 218
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 1 time

Re: Problem creating new forms.

Unread post by steven »

Merril,
I think you can only upload zip files, but you could paste it in here if you like.

Steven
If you like nuBuilder, how about leaving a nice review on SourceForge?
mkingston
Posts: 23
Joined: Mon Jul 27, 2009 5:54 pm

Re: Problem creating new forms.

Unread post by mkingston »

Sorry Steven.

CREATE TABLE MSCTP100(
CUST_ACCT_TYPE char(1) NOT NULL,
CUST_ACCT_DESC char(20) NULL,
GL_ORG char(2) NULL,
GL_DIV char(2) NULL,
GL_ACCT char(4) NULL,
GL_SUBACCT char(3) NULL,
UPD_DATE datetime NULL,
UPD_TIME int NULL,
UPD_USERID char(3) NULL);

CREATE UNIQUE INDEX MSCTP10CUST_ACC142 ON MSCTP100(CUST_ACCT_TYPE);

INSERT INTO MSCTP100(CUST_ACCT_TYPE,CUST_ACCT_DESC,GL_ORG,GL_DIV,GL_ACCT,GL_SUBACCT,UPD_DATE,UPD_TIME,UPD_USERID) VALUES("1","INDUSTRIAL","","","","",19990313,12385663,"MGK");
INSERT INTO MSCTP100(CUST_ACCT_TYPE,CUST_ACCT_DESC,GL_ORG,GL_DIV,GL_ACCT,GL_SUBACCT,UPD_DATE,UPD_TIME,UPD_USERID) VALUES("A","AIRCRAFT","","","","",19990313,12334455,"MGK");
INSERT INTO MSCTP100(CUST_ACCT_TYPE,CUST_ACCT_DESC,GL_ORG,GL_DIV,GL_ACCT,GL_SUBACCT,UPD_DATE,UPD_TIME,UPD_USERID) VALUES("B","AUTOMOTIVE","","","","","",0,"");
steven
Posts: 218
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 1 time

Re: Problem creating new forms.

Unread post by steven »

Merrill,

I belive there are 2 issues stopping nuBuilder work properly here.

1- In your table structure each field is in upper case and in the nuBuilder Forms and Objects they have been typed in as lower case. Now in mysql, this might not matter but the HTML they create is case sensitive (a POST variable $_POST['CUST_ACCT_TYPE'] is different than $_POST['cust_acct_type'] - which underpins the way nuBuilder saves fields - and JavaScript is case sensitive too)

2- There are a few simple requirements for nuBuilder table structures also.
We had a question earlier relating to the required structure of tables for nuBuilder which should answer this http://forums.nubuilder.cloud/viewtopic.php?f=4&t=42#p93.

One reason I would suggest adding an extra field and making it the Primary Key (apart from nuBuilder needing it) is that you will have the flexability in the future of changing the values of CUST_ACCT_TYPE, these codes (1,A and B) are ideal human readable codes that can be used in a lookup object.

Also if you have another field that is a Primary Key that has Foreign Keys linking to it, you are free to change the values in CUST_ACCT_TYPE to even more descriptive values (if this table gets bigger) and you won't have broken any of these relationships.

Let me know when you get it working.

Steven
If you like nuBuilder, how about leaving a nice review on SourceForge?
mkingston
Posts: 23
Joined: Mon Jul 27, 2009 5:54 pm

Re: Problem creating new forms.

Unread post by mkingston »

Steven,

Thanks. I can take care of reloading the tables, using all lower case for field names, so that's not a big problem. However, I haven't a clue how to create the PK field that nuBuilder requires. I've got an application with 195 tables, which I want to convert (re-write) with nuBuilder. I'll have over 100 customers, who will need their data converted from their current Microsoft SQL Server database into MySQL. I'll need some method to reload their data, using the PK's required by nuBuilder. If you have some suggestions, I would really appreciate it. Of course, I've got the problem of converting my own test data.

Can you please give me a link to the nuBuilder documetation that covers these issues?

Thanks,

Merrill
Post Reply