AnsweredAssumed Answered

Script for adding a field to a layout?

Question asked by Marc_Hussey on Jan 27, 2012
Latest reply on Jan 30, 2012 by Marc_Hussey

Hi all,

 

Does anyone know of a way of making sure all of the fields you have in a table are present in the layout?

 

I have a script where I'm adding a field to the table...

 

Execute SQL [ ODBC Data Source: “Test_Database”; Calculated SQL Text: "ALTER TABLE Test_CreateNewFieldwithScript ADD " & Test_CreateNewFieldwithScript::g_VDF & " VARCHAR" ]

[ No dialog ]

Allow User Abort [ Off ]

Set Field [ Test_CreateNewFieldwithScript::g_TableFieldList; FieldNames(Get(FileName); "Test_CreateNewFieldwithScript") ]

Commit Records/Requests

[ No dialog ]

 

where Test_CreateNewFieldwithScript is the name of the table, and g_VDF relates to global field on my layout that I'm using to nominate the name of the new field.

 

But now I need to make sure the new field is being added to the layout, I was expecting it to just appear but it doesn't.

 

Any ideas?

Outcomes