How do you point to a specific cell in the data table?

How do you point to a specific cell in the data table?

  

Hi, how do you point to a specific cell in the data table? I understand GetTableXXXById.List.Current.TableXXX.ColXXX points to the column and TableXXXId = GetTableXXXs.List.Current.TableXXX.Id points to the row. How to point to the cell? Thanks

Hi YS Yeo,

First things first:

  • Each Entity is mapped to a table in your database.
  • An Entity record is going to be a row in that table.
  • An Entity's attribute is mapped to a column in the Entity table.

If you want to read from the database a specific "cell" from a table, that basically means identifying:

  • which table: Entity
  • which row: Entity record (identified by the Entity's identifier)
  • which attribute: Entity's attribute

One possibility would be to use an Entity Action, if you already have the id of the row you need (assume it is stored in variable AnEntityId):

GetAnEntity(AnEntityId).Record.AnEntity.AnAttribute

Thanks for responding!


Assume:

Entity - Sheet1

Cell's row - 2

Cell's column - Question

(See image)


What I want:

To show "Consectetur adipiscing elit?" on my screen via an expression widget


What I should do:

Create an aggregate for the screen named "GetSheet1s"

Create a local variable for the screen named "Row2", with data type "Sheet1 Identifier", with default value "2"

Create an expression on the screen with value "GetSheet1s(Row2).Record.Sheet1.Question"


Is this what you mean? It is not working though. What did I misunderstand? Thanks.

YS Yeo,

In this case, you don't need an Aggregate.

If you have the Id for the row that you want already in a variable Row2, then you would simply need to have in an expression: GetSheet1(Row2).Record.Sheet1.Question

Solution

Hi YS Yeo

    Are trying to display List of Questions on the screen. for that you need to use List Records/ Table Records widget. or as you mentioned you want "GetSheet1s(Row2).Record.Sheet1.Question" this result to do that Create an aggregate GetSheet1s and access cell by 

SyntaxEditor Code Snippet

GetSheet1s.List[1].Sheet1.Question

Best Regards

Solution

Thanks Kiran! Your suggestion works! To summarize…

Assume:

  • Entity - Sheet1
  • Cell's row - 2
  • Cell's column - Question

What I want:

  • To show "Consectetur adipiscing elit?" on my screen via an expression widget

What I should do:

  • Create an aggregate for the screen named "GetSheet1s"
  • Create an expression on the screen with value "GetSheet1s.List[1].Sheet1.Question" (where [1] refers to the second item of the array)

YS Yeo wrote:

Thanks Kiran! Your suggestion works! To summarize…

Assume:

  • Entity - Sheet1
  • Cell's row - 2
  • Cell's column - Question

What I want:

  • To show "Consectetur adipiscing elit?" on my screen via an expression widget

What I should do:

  • Create an aggregate for the screen named "GetSheet1s"
  • Create an expression on the screen with value "GetSheet1s.List[1].Sheet1.Question" (where [1] refers to the second item of the array)



Thanks Jorge, but I still can’t figure it out. Check out the images below. Maybe I did something wrong along the way. Meanwhile, Kiran’s suggestion seems to work (: Thanks for the help regardless!