Deck with a virtual column

Hi everyone
I would like to create a deck with a virtual column.
the image of the view must be loaded from another table and insert an image based on the value of a column.
example :
if column โ€œopโ€ = a โ€œtyโ€ insert image ty.pnj
thank you

0 23 565
  • UX
23 REPLIES 23

try a formula like this:

select(Image_Table[Key], and([_thisrow].[op] = โ€œtyโ€, [Image] = โ€œty.pnjโ€))

Where

  • Image_Table - is the table holding the images
  • Key - is the column marked as the key for the image table
  • [_thisrow].[op] - this is the column IN THE TABLE HOLDING THE VIRTUAL COLUMN that youโ€™re pulling data from
  • [Image] - this is the column that holds the actual image file name; most likely youโ€™ll need to update this to the actual value for the image you want (look in the spreadsheet)

Okay, thanks, Iโ€™ll try.
But if I have to have more variable how do I do?
Example if in the column instead of โ€œtyโ€ I have the value โ€œTzโ€

To include multiple options for the column value, use IN() instead of the = opperator

select(Image_Table[Key], and(
  in([_thisrow].[op], LIST(โ€œtyโ€, "tz", etc.)),
  [Image] = โ€œty.pnjโ€
))

Iโ€™m sorry, I think I made myself clear.
I on each row of the Google sheet will have a different โ€œopโ€ column value.
How do I associate the correct image to the value type?
The images are about 30
Thank you.

Do you have the values stored in the sheet with the images?

Like: Youโ€™ve got Column 1 (the image), Column 2 (Op column), Column 3 (etc.) maybe more columns??


Also, in the table where youโ€™re wanting to import these images, is there a column that will hold the value for that view? LIke TY for one, another is tx, etc.?

exactly!

Then this makes things SOOO much easier

select(Image_Table[Key], [op] = [_thisrow].[Column_With_Value])

I am hopeless !!!

Wrap the SELECT() expression in ANY().

but the table where I keep the images must refer to the table where I insert the virtual column?

The error tells you what the problem is: the vettore column contains a Ref value but your Virtual Column 1 expects an Image value.

Is this an image column?
2X_8_826f765c06631bb8af61f9641f031bf715085e54.png

The Image refers to the table called vector where I keep the images.
the virtual column was created in the โ€œcenteringโ€ table which has a vector column (image) and an OP column (TEXT)

in the OP column if I find an example an โ€œACโ€ value I want it to insert the image of the vector table
sorry and thanks for the help

2X_f_f5cbc9ef960fef5b135cb39500b6aa6b29a59635.png
try this:

select(vettore[image], [vettore] = [_thisrow].[op])

โ€ฆwrapped in any()โ€ฆ

but if you want the deck view, it needs to be a listโ€ฆ and the key column now that I look at the formula.

Whichever key in the vector table is marked as the KEY in appsheet should be in the COLUMN_HERE space in the formula:

select(vettore[COLUMN_HERE], [vettore] = [_thisrow].[op])

Resolved !!!
Thank you

any(select(vettore[image], [vettore] = [_thisrow].[op]))

Woohoo!

then the vector table before was in the same google sheet.
I wanted to create another database folder I imported the new table and now it doesnโ€™t work anymore !!

if I add the table in the google sheet of appsheet everything works

Top Labels in this Space