Hello All,
Can someone tell me how to format a field in a table widget so that a URL appears as a clickable link?
Thanks!
--john
Hi,
No need to enable or format separately for URLs. When you format the table make sure the column type is a string and you can enter the URL in the attribute value. Once it's published you just add the attribute table widget in your web app builder, and you will clearly view the clickable URL in the table.
Here is a neat way to do it.
Ensure the Hyperlink (Text) field is long enough to accommodate the URLs along with its formatting elements.
You can format the field like this
<a href="file://filepath" target="_top">hyperlinkname</a>
In my example, it looks like this in ArcGIS Pro
Once published (Shared as web layer), it looks like this, in ArcGIS Online Map Viewer as well as in Experience (Table Widget).
FAQ: Is it possible to add a hyperlink path to a field in ArcGIS Pro?
Thanks for your reply and suggestion. In this case, I published a file geodatabase to AGOL and created a FeatureLayer at the time of publishing. The field shows as type "String" and length 200 (enough for this this URL). I wonder if the problem is that some of the records contain "NA" rather than a valid URL?
Is it a Hosted Feature Layer?
Then go to its Item Details Page > Data tab >Fields. Add a new Field (Text). Keep the default length, if not more.
Next, click on the Table tab (Next to Fields tab)
Click on the newly created Field Name > Click Calculate > Choose Arcade.
In the Arcade Calculator, write a similar expression.
IIF($feature.IMAGEURL=='NA','NA',<a href="' + $feature.IMAGEURL + '"target="_top">' + $feature.SCIENTIFICNAME + '</a>')
You should be able to click the link from this field from both the new Map Viewer as well as the Table Widget of Experience.