Hi all,
Could somebody tell me what is wrong with this code:
a!gridLayout( totalCount: count(local!data), headerCells: { a!gridLayoutHeaderCell(label: "Datum" ), a!gridLayoutHeaderCell(label: "Oznaka" ), a!gridLayoutHeaderCell(label: "Sreden" ), a!gridLayoutHeaderCell(label: "DrzavaAng" ), a!gridLayoutHeaderCell(label: "NazivAng" ), a!gridLayoutHeaderCell(label: "" ) }, columnConfigs: { a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "ICON") }, rows: a!forEach( items: local!data, expression: a!gridRowLayout( id: fv!index, contents: { a!textField( label: "Datum "& fv!index , value: fv!item.Datum, saveInto: fv!item.Datum, required: true ), a!textField( label: "Oznaka " & fv!index, value: fv!item.Oznaka, saveInto: fv!item.Oznaka, required:true ), a!textField( label: "Sreden" & fv!index, value: fv!item.Sreden, saveInto: fv!item.Sreden, required:true ), a!textField( label: "DrzavaAng" & fv!index, value: fv!item.DrzavaAng, saveInto: fv!item.DrzavaAng, required:true ), a!textField( label: "Naziv Ang." & fv!index, value: fv!item.NazivAng, saveInto: fv!item.NazivAng, required:true ), a!imageField( label: "delete " & fv!index, images: a!documentImage( document: a!iconIndicator("REMOVE"), altText: "Remove Entry", caption: "Remove " & fv!item.Oznaka, link: a!dynamicLink( value: fv!index, saveInto: { a!save(local!data, remove(local!data, save!value)) } ) ), size: "ICON" ) } ), addRowlink: a!dynamicLink( label: "Add Entry", saveInto: { a!save(local!data, append(local!data, save!value)) } ))
The error on test that it generated, when I add new row is :
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!forEach [line 102]: Error in a!forEach() expression during iteration 1: Expression evaluation error at function a!dateTimeField [line 107]: Invalid index: Cannot index property 'Datum' of type Text into type DataSubset
And when I try to remove it remove the whole table with the Remove Icon on the first row.
Thanks in advance,Natasa
Discussion posts and replies are publicly visible