Save a selection

your question: How do we know which currency is selected? The currency of button1 or button2?
by clicking on button1 the listview opens I choose a currency, then I click on the other button2 and I choose another currency

and when I chose the currency, this one appears on the button

To store the button1 text in TinyDB

TinyDB.StoreValue "Button1"
                  get T_G_BT1.Text

Same for button2


blocks (1)
don’t working

the value to store is G_BT1.Text and not the button component

a better tag would be button1… remember, you also like to store button2…

blocks (1)
we don’t have far, I manage to save currency 1 and currency 2 on each button, but when I reset, I have currency 2 on both buttons

just with one button its working

protip: use a different tag for each button

The needed things are,

  1. Is in the list
  2. Global variable (make a list of buttons)
  3. Some logic

When list view after picking
If the listview selection is in the list call tinydb tag list
Then alert user , already it was picked
Else (use local variable)
Ini loc variable to call tinydb tag list, if not found create empty list
Add items to the list (get local list)
Item listview selection.

When screen init
Ini Local variable with 0
For each items in the list call tinydb list
1.Set local variable to get variable +1
2.Set button text of component (select list item list get global buttons list) index (local variable)
text (get item)

may be he can use list of button components in global variable and for each items in the list event to avoid multiple tinydb


blocks (2)
don’t working ,it would have been easier if you show me with the blocks, because my English is not always perfect, thank you

Send me this sample aia… let me fix it


Your blocks are so confusing. You’re storing components but want to show the values?

On your last post, you stored 2 Button’s texts. But you’re trying to show the values of two button at one?

You alredy had your final solution… the only error you made was using the same tag to store 2 different values

Unfortunately the other contributions added more confusion into this simple task


try this…


TEST_MEMOIRE_Fixed.aia (4.4 KB)

thank you for this

1 Like

Do you need further help?

another question instead of listview, I prefer to use “listview image and text”, my problem is that in “listview image and text” I don’t have “set listview image and text—> selection” how to do thank you

You have to use add item to list block.

how to add this item in the list? to make listview image and text work