Display Default Image As Initial Value of Image Field

I am trying to set an InitialValue or Default Value for an image field (ProfilePic). Right now if there is no image specified it just shows a blank space. I would like for it to show a default profile image which I have created and stored on a DropBox drive.

I have seen the help article about using “raw=1” to get actual image from public DropBox URL.

I have tried using a LinkURL expression in InitialValue field as well as a SnapShot expression in InitialValue field.

Any other ideas?


What is the URL you’re trying to use?

Actually, due to complexities of trying to deal with Dropbox files I have now moved to just using an image stored in the same AppSheet folder as the associated data.

But even that doesn’t seem to be working. Not sure what function/expression I should be using to reference that image.

If you picture file is in the exact same folder as the data then simply “yourpicturetitle.png” in your Image column should work. You can also define it relatively “subfolder/yourpicturetitle.png”.

I placed the name of the file in the InitialValue field. The expression evaluates OK but I still don’t see the image in the ProfilePicture field when adding a new record.

I even tried making it a required field and it seemed to have something present there but now just shows an exclamation point !

See attached screen shots.

Have you looked at this?

Yes. I had already reviewed that document and video.

Since I am now storing the default image file in the same directory as my app. I believe I just need to specify the image name “PracticionerDefaultImage.png” in the InitialValue field for the column. Please tell me if this approach is incorrect.

Although it is evaluating the expression as if it is correct. It still does not show the image as an InitialValue when I try to enter a new record.

Thanks for any assistance you can provide.

1 Like

Please change the column type from Imageto Text. Does the (textual) initial value then occur for that column in the form for a new row?

Yes. It does show the Text Value of the image name. See attached ScreenShot.

Okay. You can return the column type to Image if you want.

You’re confident a file of that exact name exists in that images directory?

Thanks Steve.

I was able to resolve the problem. Went back and double-checked everything and the image file was actually in a subfolder called “Practicioner_Images”. Adding this subfolder to the path fixed the problem.

Stupid error on my part. Sorry for spending some of your cycles. Still pretty new to the platform (i.e. less than a week).

1 Like

We’ve all been there. :slight_smile: Glad you found the problem!