Page 1 of 1
Adding new database field removes all currently set data links
Posted: Sun Jan 19, 2014 10:52 pm
by Jason Cheek
How can I change the columns in a database table without having all of the links in the Data tab reset? I just want to add a new field, but doing so seems to automatically remove all current links to that table and would make me redo a lot of work.
Adding new database field removes all currently set data links
Posted: Mon Jan 20, 2014 1:36 am
by maxkatz
Do you want to add a new field or change an existing one? What exact links are you referring to?
Adding new database field removes all currently set data links
Posted: Mon Jan 20, 2014 1:50 am
by Jason Cheek
Say, for example, I have a database table with 3 columns. I build an app around it, creating a query service and linking the fields through the Data tab to be displayed in label elements. Then I realize I need a 4th column in my table. When I add the new column to the table it does not show up in the Data tab until I add it to the service response definition. But when I do that, all of the existing links to the label elements and the associated js code are lost. So I then have to rebuild the data linkage for all 4 labels instead of just adding the new one.
Adding new database field removes all currently set data links
Posted: Mon Jan 20, 2014 1:52 am
by maxkatz
If you add a new response parameter manually (in Response tab), all mappings and JavaScript you defined should be there. Can you post the exact steps to reproduce the issue?
Adding new database field removes all currently set data links
Posted: Mon Jan 20, 2014 2:41 am
by Jason Cheek
Oh, that worked. I had been using the "Automatically Create Service Response" button in the Test tab. In retrospect I should have thought of that.
So, why does adding the field manually preserve the mappings while the Automatic button resets everything?
Adding new database field removes all currently set data links
Posted: Mon Jan 20, 2014 4:20 am
by maxkatz
When you automatically create the structure it re-creates it from scratch, it can also be different so keeping the mappings is not simple.