Get Image from database to form

Hi,

I have an app to record a ‘daily stand’ on a construction site. In the app form, I take a picture of the kanban for next week (e.g. week 402021 I take a picture for week 412021).
Picture is showing in the app, XLS etc. no problem working fine.

Now I want to show the picture I took in week 402021 for week 412021 when I start a new stand in the same project in week 412021.

I created Thisweek, Nextweek and Lastweek virtual columns to get the picture.

The problem is, I can not get the picture to show in the form.
My app is in a folder that has 2 sub folders being ‘stand’ = XLS-sheet as database and the folder Stand_Images where all the pictures go.

In the XLS in the Image column it shows Stand_Images/name of the picture in the folder (generated by the device when taking the picture). e.g. Stand_Image/87e2cbc6.Picture2.jpg (Picture2 is the column where the picture is stored when taking it from phone or tablet).

How can I show the picture as ‘last week kanban’ in my form? I read all articles I could find on Appsheet, read a lot of topics in the forum, but still can not figure it out. In the Picture1 (column I want to show the picture) I have tried Image type, show type, drop down … (according to topic in this forum and video in appsheet article) …

Formula, Initial value etc. with a SELECT expression that works, but always returns the error of ‘not matching type’ (with List or other). When I test the expression, it works, shows the correct path in the columns but the picture does not show.

What am I doing wrong? Can’t figure it out how to make this work. Can use some help.

Best regards.

0 5 265
5 REPLIES 5

Try moving the “Stand_Images” folder inside of the “Stand” folder. I believe, though I have yet to confirm personally, AppSheet uses the folder where the workbook is located as the root to locate any referenced folder in the app.

Hi John,
The APP is on OneDrive under
BouwXLV10-3527558
Then there is a folder (folder logo from Windows) that says Stand_Images
Then the XLS Stand file
(how do I paste a screenshot inhere?)

So XLS and Stand_Images are under the same BouwXL folder.
Do I need to create an extra folder to put them both in?

Images are displaying in general views and detail views, but I can not ‘pick it up’ to show in the form.

No. It sounds like you have it correct. I mis-understood from the original post.

Re-reading, I am not certain I understand what you have currently tried. Here is what I would do.

Add a “normal” column to the “Daily Stand” table (or whatever you call it) named “Last Week Kanban”. This column would be of Image type and the “App Formula” would be set to the proper SELECT() expression to choose the path value of the image you wish to show. Make sure to add this column to the Form view for display.

The reason for a normal column, is that once the image is set, it likely doesn’t need to be changed. You can use a Virtual Column but they are re-calculated on every Sync which probably is not needed in this case.

NOTE: It will only display if it is picking up a proper image path. You can test it by temporarily changing the column to TEXT to see what path details it is picking up.

Hi John,

The Picture1 column is a regular column, from the type Image.
With SELECT, I get the proper image path (with the test button in the expression builder, I see the correct path showing up according to the select expression - where I use a few virtual columns to get data).

So I am getting the correct path, in the correct column, but I get ERROR warning of the data type being ‘list’ where it should be ‘image’. I have used COUNT and MAX to get only 1 value in stead of a list, but still the same ERROR keeps showing. Apparently using SELECT() in APP Formula in a IMAGE column is not accepted. (?) since the result of the expression is ‘list’.

Ah, yes. You need to simply wrap the SELECT() function with an ANY() function like so:

ANY(SELECT(...))

ANY returns the first list value. Likely there is only one but it is still represented in list form.

Top Labels in this Space