Rank: Newbie
Groups: Registered
Joined: 11/11/2017(UTC) Posts: 4 Location: Michigan Thanks: 1 times
|
I'm new to MT and created a top page with a list of items. When a user clicks on a row of the table it takes them to a page to edit the item data attributes like description and unit of measrure UoM. All is working well until I add a combobox for the UoM. The combobox is linked to a datasource of valid values in a db table. The list of values renders correctly and allows for a selection but now the page does not save data to the db. Is there some example or doc on how accomplish both? thanks I attached the project file and a word document after I made some adjustments. I have the save of the Update record working except for one field, a checkbox control. Also getting an error msg when Inserting a new record. Much appreciate the help.
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
Can you attach your MTD file so that we can review. There must be some small issue in your design, because whether you use combo box or not should not matter.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/11/2017(UTC) Posts: 4 Location: Michigan Thanks: 1 times
|
Hi, I wasn't sure you saw I attached my files per your request to the original message.
Thanks
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
You are right - without a new posting I had no idea that you attached files. Please note, that I can only guess the answer to your issues, because I have no access to your database. Your first problem with the saving value of Inactive edited via check box is most probably because of the text values used to save checked and unchecked state. They are configured by default as true and false, which is correct for XML files. But in case of the database, they must be most probably 1 and 0. Once you make these changes, saving should be fine. bbv attached the following image(s):
|
1 user thanked bbv for this useful post.
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
Your second issue comes from a lot of DB sources which you have. You are using a completely new $DB4 data source which was never loaded and therefore has no structure in it. You also make a mistake by adding data from DB4 to PERSISTENT instead of the opposite way. In order to make it as simple as possible for you, I can recommend you to reuse $DB2 source on the Item Add page instead of creating a new one DB4. Set KeyID to 0 before you enter this page, which will result in no records loaded to the DB2 tree, but it will be prepared for insert. Rename element Current under PERSISTENT to Row, for ease of insert. And then change the Append Node to add the edited row from PERSISTENT to DB2. I've tried to make all these changes in the attached file. As I said, I was doing everything blindly without a chance to actually try. Hope it will help you to actually make everything right. File Attachment(s): bbv attached the following image(s):
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/11/2017(UTC) Posts: 4 Location: Michigan Thanks: 1 times
|
This all makes sense. Thanks for the quick reply.
Some day I'll progress from being a rookie at this.
|
|
|
|
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.