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?
@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,
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
@John_Baer1 Try this:
IF(ISBLANK([_this]), โhttps://www.appsheet.com/newshortcut/9ff3f2ab-1003-4cf0-8c52-019a1a8753c9โ, TEXT([_this]))
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!
User | Count |
---|---|
40 | |
34 | |
28 | |
23 | |
17 |