Can I put specific numbers in a table and then refer to the table row /column to set a global variable?


#1

I have a table with data

and I want based on user choices to pick data from this table:
selected -> set global variable value

where the value comes from this table (e.g. row 1, column 4)

is something like that possible?


#2

Hey @yinkie, it is possible–you will need to use a repeater and add the “Click or Tap” interaction for every widget inside the repeater that sets the global variable value to the value in the repeater dataset. Here is a mini example that illustrates this approach. I added the global variable “ClickedText” to store the value of the selected repeater cell. There is also a debug rectangle where you set text to the value of this global variable.


RepeaterClickGV.rp (50.8 KB)

You can also add the “Selected” style for the widget inside the repeater and use the “selected/checked” action to highlight this cell.


#3

I think i want something the other way around.
To be more specific:

  • i have three radio buttons in a group, a, b, c
  • i have three global variables d,e,f
  • i have a table with data
  • when A is selected set global variabele D to value of row1,colum2 AND set global variable E to the value of row4,column5

Etc


#4

it would help already if i have something like this:

button ->
on click set variable value “X” to text on (specific table item)


#5

Hi @yinkie, you can use the “virtual” column with unique identifiers, and then the
“filter” action along with the “listener” on the “Selected” interaction for the radio buttons to do that. I’ve attached a simple example that illustrates this behavior.
I added the column “Count” to the repeater dataset in this file and used numbers as unique identifiers. Then, whenever you select a radio button, you first set the value of the variable that’s responsible for keeping information about the radio button selection state to “true” (you will need it later to distinct what radio button was selected in the conditions for the “Listener”), then filter the repeater to find the row you want (I used the [[TargetItem.Index]] for one of the filters to illustrate how it would work with the table index in case you don’t want to use the virtual column).

Then, you use the “Listener” to access the repeater dataset by moving the widget inside the repeater by (0;0) and adding the “Moved” interaction for this widget.

You will also want to reset your filters at the end of these actions to make your repeater look normal:

One small thing: I assume that when you test, you select radio buttons in turns, so to make things under the same “Moved” interaction with conditions work, you will need to use the “Fire Event” for the “Listener” when you set up conditions for the next radio buttons.

Here is the file Repeater_Cells_filter.rp (61.2 KB)
and the link: https://mvew91.axshare.com/. If it is not something you were looking for, can you please share more details about the desired behavior with us?