How can I create a list with global variables that is not empty?

I have some variables like

global variable product1 product2 etc

when I press a button I need to fetch the variables that are not empty

you can use if, global variable is not equal to create empty list,

for getting data from too many veriables, you can add all that veriables to a list, and then use
for each item in list, if get item is not equal to create empty list then get data,

1 Like

I could not do it friend :frowning: I need to send some data to airtabe.
there are 4 labels . if a client choose first product first labe is appearing like ’ First product - price’
for second ’ Second product - price’ if only one is choosen the others are being inivisible.
When I send data to air table. I dont want these two empty strings to appear.

What do I need to do ?

global variables data = create empty list or make a list ^?

when button.clicked
for each
call.spreadsheet.create row

I have these components.

then you can use, add item to list,
when user select first product,
show label and add item to list(veriable) item ( label text)
when select 2nd product ,
show label 2 and add that to list also,

when save click
create a row,
and set that list to empty for next use

1 Like