Source.uri should not be an empty string

In Appguyver I get the error source.uri should not be an empty string .
Probably the reason is, that I try to receive a URL via REST and the value is null in this particular case.

Whats the best solution to not show the image when the source URL is null?

I expected the image to be hidden, if there is no resource…

Hi,

you can toggle the visibility of the image component with a formula to check if the source url is null or not. Look under the advanced properties of the image component, bind the visibility to a formula like: !IS_EMPTY(imageUrl)) or !IS_UNDEFINED(imageUrl)

If there is no image url available, the image component should stay hidden.

Hi Cecilia, thank you for pointing the way. However when I tried, the formula warned me “Unknown reference “imageUrl””. All the images are hidden even those has Url link. How should I solve this?

Hey,

I used imageUrl as an example of whatever holds the url for you image. So replace it with the same variable that you are using in the Image component’s source property :slight_smile:

Hahaha my bad!
Thank you Cecilia for the prompt reply!
Jay

1 Like