[SOLVED] New Database Fields not Appearing in Grid App (Despite Data Dictionary Updat

I have a form app and grid app both based on a table. I added a column to the table and updated both apps via Data Dictionary. Immediately I could see the new field under Application => Synchronize Tables and then the fields list after confirming the add. However, there is no Synch Table option under the grid app nor can I see the new db column under the field list.

Despite this, I put a WHERE clause using the new column in the grid’s SQL and it works fine but the field is not available for display on the grid.

Is this normal? Is there any way to fix this without recreating the grid app manually?

If the only option is to recreate the grid app, is there a way to sort of automate this? Having to step through each fields properties and copy/ paste into events seems laborious.

Thanks

By the way, during sync, the new fields don’t get listed between — Processing start —
and — Processing completed —

Hello,

To sync Grid applications, go to SQL and add any fields that are now a part of the table and application as well.

For instance:

SELECT Field1 FROM MyTable

Then you added Field2 to that table.

Go to the Grid SQL, and update it to:

SELECT Field1, Field2 FROM MyTable

regards,
Bernhard Bernsmann

This is awesome, thank you

Worked on the first app. On another, I’m getting “Fatal error: Call to a member function FieldCount() on a non-object in C:\Program Files (x86)\Dev\NetMake\v6\wwwroot\scriptcase2\devel\lib\php\database.inc.php on line 855”. Why could this be?

Hello scriptcaser,

This error usually happens when there is something wrong with the sql statement. It might be an extra comma or letter. Have you tried to run this statement on your RDBMS?

regards,
Bernhard Bernsmann

This is true about the Error, but not true about updating field list. I have the same problem. Did some changes in a database, reassigned all fields properly in SQL SELECT statement, but when I go to “Fields Positioning” OR “Edit Fields” I see an old list. In such case I’m not able to update the grid and basically the whole App is useless. Can you please tel me how to update those properties after modifying SQL statements ???

Arthur

If you save the sql statement then the fieldlist in the fieldspositioning is updated, at least here. Then you move the fields into the form where you want them etc.

Here is what I have found when adding fields to a grid.

Make sure you add the new fields to the bottom of the list.

I was adding them in the middle of the statement and kept on getting fatal error.

Kevin

I’m experiencing similar problems, and I think SC has some problems updating new columns added to the table. I also noticed that when you change your database i.e. MySQL to SQLite the SC goes nuts and does not update field list at all. There is probably some caching problem, but I’m not sure where to look for…

Arthur

[QUOTE=Kdriscoll;14113]Here is what I have found when adding fields to a grid.

Make sure you add the new fields to the bottom of the list.

I was adding them in the middle of the statement and kept on getting fatal error.

Kevin[/QUOTE]

Issue reported to our bugs team.