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.
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.
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.
Import the Pics table, which is still empty, into AppSheet.
Add a virtual column to MainTable, letโs call it โVirt Col Imageโ. App Function:
=ANY(SELECT(Pics[Image], [ID]=[_THISROW].[Key]))
Make sure that Virt Col Image has column type โImageโ.
The two labels for MainTable should ideally be (1) the personโs name; (2) Virt Col Image.
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.
MainTable will automatically get another virtual column added, called โRelated Picssโ. You can ignore this one, and mark it as Hidden.
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.
The images will appear in Virt Col Image in MainTable.
User | Count |
---|---|
42 | |
34 | |
26 | |
23 | |
15 |