I have used the below HTML code which basically gets the URL from the "Logo" field and displays the image next to the title in the Details widget.
<p><img src="{Logo}" style="float:right; height:12%; width:12%" /></p>
There are some Null values in the Logo field; that presents a small rectangle next to the title. How should I modify the code to hide Null values from the dashboard?
Here's the post you want: https://community.esri.com/t5/arcgis-online-documents/hide-field-in-pop-up-using-arcade/ta-p/1029496
Add the expression to a style parameter on the <p> element, and you should be all set.
I saw that post. It actually works in the AGOL pop-up. There is no Attribute Expression in the Dashboard Details widget.
Oh, sorry. The Details widget just pulls the map's popup configuration. Or if the layer is being pulled directly into the dashboard not via a map, from the item's Visualization settings. Configuring the popup in the appropriate place will update the dashboard automatically.
This image (logo) needs to be displayed next to the title. They are not supposed to be displayed on the map pop-up.
The HTML code that I have used works perfectly but it only needs to be modified to hide the NULL values.
Oh, I see! The popup has its own "title", so I was confusing the two.
In this case, you can't use the layer directly. You'd have to use a data expression instead; are you familiar with those?
Or could you simply configure the popup to contain this instead, rather than doing it separately in the dashboard?