Getting Data into editable grid

Hi,

I have written the following code where sampleData is a DataStore entity, but I am not getting any data in the front end:

rows: a!forEach( items: ri!sampleData,
expression: a!gridRowLayout(
contents: {
a!textField(
value: ri!sampleData.Account,
saveInto: fv!item.Account,
readOnly: true
),
a!textField(
value: fv!item.jan,
saveInto: fv!item.jan
),
a!textField(
value: fv!item.feb,
saveInto: fv!item.feb
),
a!textField(
value: fv!item.mar,
saveInto: fv!item.mar
)
}
)
),

But when I open the front end I see the following table:

What should I do so that the front end shows the data?

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Appian Employee
    in reply to Karanc

    Karan,

    That depends on how and where you want to use that interface. I suggest you passing as an input the type (CDT) that will be used in the grid. Once you decide on that, you just need to ensure that you're passing the correct type everywhere you use that interface. 

    Assuming that "get data from the backend" means getting data from a database, you can create a rule input that will retrieve the data that you want (using queryEntity), cast that data to the proper CDT and then you can reference that rule where you call your interface. Something like this:

    rule!interface(sampleData:rule!GetDataForInterface())

Children