Select to view content in your preferred language

Add a dynamic URL to an outside web page in the embed widget

1272
9
11-08-2023 12:00 PM
AngelaSchirck
Frequent Contributor

I want to have a dynamic URL that displays the property appraisers website in my experience.

I used the embed widget, connected to the parcels layer and put the URL as:

``` https://www.pbcgov.org/papa/Asps/PropertyDetail/PropertyDetail.aspx?parcel={Parcel Number}```

Where {Parcel Number} is the name of the field containing the parcel number (duh).

But this doesn't work.  When I select a parcel it does not replace the url with that parcel's parcel number.

The only help I find from ESRI is to embed apps or experiences, not outside webpages.  It seems this should be a very simple task and I can't be the first person wanting to link dynamically to an outside web page.

I do not want to change the feature layer by adding a url field (as this data is not mine).

Does anyone know if this is possible? I'm using ExB Developer's ed 1.12.

0 Kudos
9 Replies
leahmaps
Frequent Contributor

remove the space in the {parcel number}. Attributes using {} can not have spaces.

Does that fix it?

0 Kudos
AngelaSchirck
Frequent Contributor

I tried that.  Double clicking on the attribute puts it in as the alias, the "real" attribute name is "parcel_number" and I tried that and it still didn't work.  Thanks.

0 Kudos
JeffreyThompson2
MVP Regular Contributor

I think you may need to remove the quotes around your url.

GIS Developer
City of Arlington, Texas
0 Kudos
AngelaSchirck
Frequent Contributor

I didn't have quotes around it, only in this post.

0 Kudos
AngelaSchirck
Frequent Contributor

What it's doing is throwing an error on the web page because the parcel number is {PARCEL_NUMBER} instead of an actual number.  When I type an actual parcel number it goes to the website. The parcel number isn't getting passed for some reason:

AngelaSchirck_0-1699535545690.png

 

0 Kudos
JeffreyThompson2
MVP Regular Contributor

It looks like your error is coming from outside Experience Builder, on the website you are connecting to.

Can you use your browser tools to inspect the Embed widget? You should be able to find what the url it is trying to connect to in there. Does it ever change to a parcel number as you select other things? If so, the solution is to alter the other website to handle the url ending in {Parcel Number} in a more graceful way.

GIS Developer
City of Arlington, Texas
0 Kudos
AngelaSchirck
Frequent Contributor

It's not passing the parcel number:

AngelaSchirck_0-1699545233481.png

As I select other parcels it doesn't change, it just says {PARCEL_NUMBER} in the url passed to the embed widget.  Since it's not acctually passing a number to the website, it's throwing the error.

0 Kudos
JeffreyThompson2
MVP Regular Contributor

Ok. That helps narrow things down. I did try adding an Embed widget to a layer that contains a full url as an attribute and it was dynamically changing the url, so if you can add a url field to your data it should work for you.

I know you don't want to do that, so try this kind of syntax first.

restOfUrl + {Parcel Number}

"restOfUrl" + {Parcel Number}

Maybe adding the plus sign like this will fix your problems.

GIS Developer
City of Arlington, Texas
0 Kudos
AngelaSchirck
Frequent Contributor

Nope 😞

Thanks for your help! I am now leaving for the long weekend....I will be back to this on Tuesday.

0 Kudos