How can I logically apply a "no image availab...

How can I logically apply a “no image available” image?

I have a static image which I can reference in “Initial value” field from Google Drive.

It shows up as expected for the Image when creating a new item entry.

While this seems to just record on the record the URL to that static image,

each item saved in this manner will add to the size of the dataset - URL’s are typically longer (more text) than the relative file paths used when capturing images from the device.

Instead, what I’d like to do is have the view show the static image when the Image column is null/blank.

I did try using an IF() expression on the App Formula to use the URL for static image when ISBLANK() but I got a type mismatch ( I assume Image vs Text).

I have not found a way I can return the Image from the URL.

Is there a way I can do this?

0 10 1,074
10 REPLIES 10

tony1
New Member

@John_Baer1 What’s the formula you’re using that resulted in an error?

Need this No Image Image, ty!

One workaround is if you add a Show type column with this “No image” and then depending of the record’s status, show or hide that field.

@Stephen_Mattison I pulled the image off of Google Images if you are wanting one for yourself.

I then uploaded it to Google Drive for use.

@tony

Tony,

I tried this App formula:

IF(ISBLANK([_this]), “https://www.appsheet.com/newshortcut/9ff3f2ab-1003-4cf0-8c52-019a1a8753c9”, [_this])

It resulted in this error message:

“IF function is used incorrectly:the second input (if-result) and third input(else-result) should have the same type.”

I tried looking for a way to retrieve the image from the text URL.

I tried a few of the URL based functions but they didn’t work for me.

Ironically, if I put this same URL text in the Initial Value field, AppSheet loads the image.

Is there a way to retrieve an Image from its URL in an AppSheet formula?

Follow

tony1
New Member

@John_Baer1 Try this:

IF(ISBLANK([_this]), “https://www.appsheet.com/newshortcut/9ff3f2ab-1003-4cf0-8c52-019a1a8753c9”, TEXT([_this]))

@tony

Solved.

Your suggestion fixed the syntax error but didn’t work as is.

I played by creating a virtual column.

Setting it to Text first, I could see the proper strings were being selected.

I switched to Image, and the "no image’ rows would only display a gray triangle with and exclamation, i.e. couldn’t get image.

As I figured,

AppSheet doesn’t detect URL here.

It only tries to find in the relative path.

So, I copied my image into the relative path and changed the formula to that as shown below.

This worked!!

However, when I tried to apply this formula to the Product Image (original) column,

The “no image” doesn’t show.

I am not sure why App Formula is not firing.

If I use the virtual column as type of Image, it works fine.

=IF(ISBLANK([Product Image]), “Inventory_Images/Product Image_no_image.png”, TEXT([Product Image]))

Sorry but I am still not following how you got this to work. Can you please step through what you did to make this work again? When I use this formula in App Formula, I get the correct “No Image Icon” but then I can’t change the image. When same formula entered into Initial Value, it does nothing. Also, I don’t understand the TEXT ending, what’s that doing? TYVM!

@John_Baer1 Good work! Thx!

Top Labels in this Space