SercoSteve
Programmer
Hi
I have two tables partslist_dev1.DB and partslist_dev2.DB. The tables are copies of each other with one modification made to partslist_dev2.DB. The modification being Partslist_dev2.DB contains a Table Lookup to another table referenced using an ALIAS.
I am attempting to modify the structure of partslist_dev1.DB to that of partslist_dev2.DB from a pushbutton using the code shown below, can anyone see what I am doing wrong as the Restructure always returns FALSE.
var
custTbl Table
modifiedTbl Table
dynNewStru DynArray[] Anytype
endVar
custTbl.attach("RIVartslist_dev2.DB"
if custTbl.isTable() then
custTbl.enumFieldStruct("RIV:newstructure.DB"
custTbl.unattach()
if modifiedTbl.attach("RIVartslist_dev1.DB" then
if modifiedTbl.isTable() then
dynNewStru["FIELDSTRUCT"] = "RIV:newstructure.DB"
if modifiedTbl.restructure( dynNewStru ) then
custTbl.unattach()
moveTo(plist)
endIf
endIf
endIf
endIf
Thanks in advance
Steve
I have two tables partslist_dev1.DB and partslist_dev2.DB. The tables are copies of each other with one modification made to partslist_dev2.DB. The modification being Partslist_dev2.DB contains a Table Lookup to another table referenced using an ALIAS.
I am attempting to modify the structure of partslist_dev1.DB to that of partslist_dev2.DB from a pushbutton using the code shown below, can anyone see what I am doing wrong as the Restructure always returns FALSE.
var
custTbl Table
modifiedTbl Table
dynNewStru DynArray[] Anytype
endVar
custTbl.attach("RIVartslist_dev2.DB"
if custTbl.isTable() then
custTbl.enumFieldStruct("RIV:newstructure.DB"
custTbl.unattach()
if modifiedTbl.attach("RIVartslist_dev1.DB" then
if modifiedTbl.isTable() then
dynNewStru["FIELDSTRUCT"] = "RIV:newstructure.DB"
if modifiedTbl.restructure( dynNewStru ) then
custTbl.unattach()
moveTo(plist)
endIf
endIf
endIf
endIf
Thanks in advance
Steve