Select to view content in your preferred language

How to hide tabs in View Navigation Widget if no data to display in Experience Builder

313
4
Jump to solution
12-02-2024 07:48 AM
Labels (1)
KristenGrimes
Emerging Contributor

I have a View Navigation Widget which displays tabs: Images, Video, and AR View. I would like to have the tabs disappear if there isn't any data instead of a message that appears 'It's not a valid URL'. Is this possible?

If I can't do that, is there a way to update that error message to display something more friendly?

See attached images.

0 Kudos
1 Solution

Accepted Solutions
abureaux
MVP Frequent Contributor

I think that is a limitation of the widgets. Many (if not all?) widgets seem to be missing "null value support". I heard that this is coming "soon" to at least the graph widgets. You may wish to log this as a bug with Esri support.

View solution in original post

4 Replies
abureaux
MVP Frequent Contributor

I think that is a limitation of the widgets. Many (if not all?) widgets seem to be missing "null value support". I heard that this is coming "soon" to at least the graph widgets. You may wish to log this as a bug with Esri support.

KristenGrimes
Emerging Contributor

I submitted a bug and they made it a feature request!

TonghuiMing
Esri Regular Contributor

@KristenGrimes Unfortunately, you cannot dynamically hide the view based on its content, since it wouldn't know what happens inside, as of now. The Views Nav widget is more like a container.

 

The Embed warning is a bit more complicated to image/button/text, etc., which we might be able to define as an "empty message" if there is no data. The embed widget is an iframe and evolves URL resolving and rendering - the runtime errors could be unpredictable and depend on the embedded content.

I am a bit confused - in your case, it says "not a valid URL", this could be avoided by configuring the URL correctly. Is that a dynamic URL populated from the data, or something you typed in manually? This warning happens when the URL does follow standard URL syntax, for example, HTTP instead of HTTPS. A shared sample data would be helpful for us to take a closer look at your case.

0 Kudos
KristenGrimes
Emerging Contributor

Added sample data. Makes sense that it's not the right syntax, it'll give the error. In this particular case, I'm receiving the "not a valid URL" error if there is no data. In reference to the attached, we won't have URLs (videos) for most locations so it would be helpful to display something different than this error message so we don't get calls or even better to not display 'video' in the first place.

0 Kudos