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("
RIV
artslist_dev2.DB"
if custTbl.isTable() then
custTbl.enumFieldStruct("
RIV:newstructure.DB"
custTbl.unattach()
if modifiedTbl.attach("
RIV
artslist_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("
if custTbl.isTable() then
custTbl.enumFieldStruct("
custTbl.unattach()
if modifiedTbl.attach("
if modifiedTbl.isTable() then
dynNewStru["FIELDSTRUCT"] = "
if modifiedTbl.restructure( dynNewStru ) then
custTbl.unattach()
moveTo(plist)
endIf
endIf
endIf
endIf
Thanks in advance
Steve