Has anyone any experience of having a virtual...

Has anyone any experience of having a virtual column that has an image? I’m working on an app that downloads and uses as specific table each time a member of a group joins/leaves. That file does not have an image column, so I want to add images to the table as a virtual column, but can figure out how to make it work.

Any helps is appreciated.

0 5 355
5 REPLIES 5

From where do you want to read the image(s)?

And why does it need to be a virtual column?

Sorry, I think I got it, you are unable to add an image column to the table you are reading data from. Interesting.

Yes, Stephen. Since I’m downloading the updates via a spreadsheet, the image column doesn’t exist. So I want to be able to download the “new” data without having to copy/paste into an old spreadsheet. I figured maybe if I had a virtual column that referred to an image, or perhaps an image table, so that an image of a person would show up. If that made any sense…

I had a similar need, and found a solution using a virtual column. Maybe it will work for you.

  1. Let’s call your table “MainTable”. You will need an additional back-end table where the images are stored, as you can’t store anything in a virtual column. Let’s call this table “Pics”. Here, in addition to the key column, you need a column for the images, let’s call it “Image”, and a column that identifies the image, “ID”. The values in ID will be copies of the values from the key column in MainTable, let’s call it “Key”. We’ll set up the link between the tables inside AppSheet, so you don’t have to manually copy over the values. Let’s also use AppSheet to upload the images, this is faster and easier than copy/pasting images into sheets back-end.

  2. Import the Pics table, which is still empty, into AppSheet.

  3. Add a virtual column to MainTable, let’s call it “Virt Col Image”. App Function:

=ANY(SELECT(Pics[Image], [ID]=[_THISROW].[Key]))

  1. Make sure that Virt Col Image has column type “Image”.

  2. The two labels for MainTable should ideally be (1) the person’s name; (2) Virt Col Image.

  3. In the Pics table, edit the ID column: Set the column type to ref, and in ReferencedTableName select MainTable. Set Valid_If to FILTER(MainTable, ISBLANK([Virt Col Image])). This creates a dropdown of people who still don’t have images.

  4. MainTable will automatically get another virtual column added, called “Related Picss”. You can ignore this one, and mark it as Hidden.

  5. To upload the images, open the app on your PC (if the images are stored there). Open the form view for Pics and add a new row. The ID field will show the dropdown of people without images. Select one of them, and upload the image to the Image field. Repeat.

  6. The images will appear in Virt Col Image in MainTable.

Top Labels in this Space