Select to view content in your preferred language

format field in table widget

1082
5
07-10-2021 08:46 PM
by Anonymous User
Not applicable

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

 

0 Kudos
5 Replies
DrVSSKiran
Frequent Contributor

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.

 

DrVSSKiran_0-1625987781047.png

 

0 Kudos
by Anonymous User
Not applicable

Thanks for your reply, but that doesn't seem to be working for me (see screenshot below).  This is a text field from a hosted FeatureLayer.  Works fine in the popup, just not in the table widget.

 

 

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

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

JayantaPoddar_0-1625987142482.png

 

Once published (Shared as web layer), it looks like this, in ArcGIS Online Map Viewer as well as in Experience (Table Widget).

JayantaPoddar_1-1625987227948.png

FAQ: Is it possible to add a hyperlink path to a field in ArcGIS Pro? 



Think Location
0 Kudos
by Anonymous User
Not applicable

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?

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

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.

JayantaPoddar_0-1626033234083.png

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.

 



Think Location
0 Kudos