Select to view content in your preferred language

Question

1035
3
04-20-2021 02:58 AM
Labels (1)
alaaahmad
New Contributor

Hi,

I have a field with the url for pdf.
When creating a popup and adding a hyperlink (more info),
They appear all the time even if the field has data or not.
How can I only show it (mor info) when the field has data?????

0 Kudos
3 Replies
jcarlson
MVP Esteemed Contributor

If you want to only display the link if the field is filled in, you'll need to use an expression. Arcade has a function IsEmpty that would work well here.

var p = $feature.pdfField

if(IsEmpty(p)){
  return 'No PDF'
} else {
  return p
}

 

- Josh Carlson
Kendall County GIS
alaaahmad
New Contributor

thank you Josh.

but I really can't use the expression.

0 Kudos
jcarlson
MVP Esteemed Contributor

I guess it would be helpful to know the context in which you are working, and why something like the expression above doesn't fit your situation.

- Josh Carlson
Kendall County GIS
0 Kudos