Table Indexing for Record Retrieval


#1

Hey – Noobie here . . . I’m a work-based learning student using axure and need to use a hidden table to store static data which will populate screen text widgets. I want to retrieve the table cell text using the values in the first column and first row (like an x, y coordinate). Is there a way to do this or do I need to name all the cells in the table to access them ?

Thanks for your help,
MJ


#2

The short answer to your question is, “Yes. You will need to name each cell ‘widget’ in a table in order to reference them.” However, the answer could change (at least a little bit) if you’re using a repeater.

The table widget isn’t very complicated. It’s a way to quickly create a bunch of ordered boxes but there’s no logic in place to make them "aware of each other. The repeater widget, on the other hand, does work a little like a traditional database table, at least at a very basic level.

You still need to name all of the shapes inside the repeater in order to reference them, but you would only have to do it for one “row”, all subsequent rows would be created automatically. For example, a table widget with three columns and three rows would have 9 unique widgets that would all need their own name. A repeater with the same setup would only have three, one for each column in the first row.


#3

Thank you. That helps.

For a repeater widget, how would I reference the text in one cell using row and column? When i reference by Item.Column it gives me the text in the last row of that column.


#4

Pulling content from a specific “cell” in a repeater is possible, but it’s a bit complicated and requires being pretty comfortable with how repeaters work: Load_Specific_Cell_Data.rp (90.2 KB)

It’s kind of hard to describe what’s happening so I hope this makes (at least some) sense:
The only time a widget inside a repeater is truly “unique”, is at the time it is created. So if you want the text inside “Widget D” on “row 5”, you have to ask for it when the repeater is busy creating “row 5”, because after that, the name “Widget D” refers to the one on “row 6”. That’s why, if you wait until the repeater is completely finished loading, and say, “Get the text on ‘Widget D’,” it’s returning the text on the last thing that had that name. I’m hoping that looking at the sample file will give some better context without me having to write a long and boring essay. :grinning: The short version is that the repeater checks for conditions as it builds and populates content as needed. If the conditions change, the repeater rebuilds, checks again, and makes whatever changes are necessary.

I don’t know exactly what you’re trying to achieve, but I will say that this is a pretty complex method just to display some dynamic content. It’s possible there might be a far easier/faster way to get what you’re looking for.