Select to view content in your preferred language

Search Experience Builder With Link

1628
5
Jump to solution
10-31-2023 01:11 PM
LoganCountyMapRoom
Occasional Contributor

In Web Map Application, we could have the map search for a feature based on the link parameters. 

For example: https://loganco.maps.arcgis.com/apps/webappviewer/index.html?id=091daba2090b4a079372081f7c36d43c&fin... 

would take you to the web map and search for parcel number 51-074-00-00-033-001. Is there a way to do this in the AGO version of Experience Builder?

0 Kudos
1 Solution

Accepted Solutions
gis_KIWI4
Frequent Contributor

No easy way. You can pass data parameters in the URL and you can only use object ID. 
An example link below - the bit at the end refers to the object ID. '%3A' = ':' and 9 is the objectID.

https://experience.arcgis.com/experience/a4d356b025994edca83286458ba12dbb?data_id=dataSource_1-4a27d2f021aa4ed08f46c7296c9be912%3A9 

You can use non-object ID attributes but only for filtering.
https://doc.arcgis.com/en/experience-builder/latest/build-apps/url-parameters.htm

The problem is that it doesn't trigger any of the zoom/pan actions when using the data filter.

Another resource you may find helpful.
https://community.esri.com/t5/education-blog/url-parameters-with-experience-builder-send-your/ba-p/1...

Also I have noticed this seems to be a deal breaker for quite a few people looking to move to ExB.

View solution in original post

5 Replies
gis_KIWI4
Frequent Contributor

No easy way. You can pass data parameters in the URL and you can only use object ID. 
An example link below - the bit at the end refers to the object ID. '%3A' = ':' and 9 is the objectID.

https://experience.arcgis.com/experience/a4d356b025994edca83286458ba12dbb?data_id=dataSource_1-4a27d2f021aa4ed08f46c7296c9be912%3A9 

You can use non-object ID attributes but only for filtering.
https://doc.arcgis.com/en/experience-builder/latest/build-apps/url-parameters.htm

The problem is that it doesn't trigger any of the zoom/pan actions when using the data filter.

Another resource you may find helpful.
https://community.esri.com/t5/education-blog/url-parameters-with-experience-builder-send-your/ba-p/1...

Also I have noticed this seems to be a deal breaker for quite a few people looking to move to ExB.

LoganCountyMapRoom
Occasional Contributor

Thank you for replying! I noticed this when playing around with the new URL parameters in the Share Widget. Now that you mention it, it does appear to be selecting the feature, but does not zoom to it.

Hopefully this gets resolved by June 2024, because this is a huge deal breaker. We have a public site where people can see their tax information. On there, we allow people to click a button to view the map. This is a very common thing for counties to do. Not being able to link the real estate website to the map will be very inefficient for almost everyone that uses it. 

0 Kudos
DavidForbuss1
Frequent Contributor

Same issue here.  We have links that take account numbers from our billing software and allow the billing clerks to open a map that zooms to the customer location in webapp builder.  I can't get it to work in ExBldr.  Really really need this...I don't see why it's so difficult to include since it existed already in WAB.

0 Kudos
FredericPoliart_EsriAU
Frequent Contributor

Can't we create a custom widget that looks at the URL of the browser running ExB?

window.location.href;


..and then improve that widget (below) to parse the /?find=51-074-00-00-033-001 and push it to the Search widget?     The widget below could be a 2x2px transparent that just reads the URL params, then waits for all the widgets to be properly loaded (could be tricky haha).   make sure that your ghost transparent widget is the very last loaded in the ExB list on the left.    or put a 2sec delay before attempting to invoke the search widget.     -- there: nice little project for you  🙂 

Custom widgets only work with the ExB Dev Edition or with the Enterprise ExB.  - not with AGOL as far as I know. 

 

 

// src/UrlParamDetectWidget.tsx

import React, { useEffect, useState } from 'react';

interface UrlParamDetectWidgetProps {
  // Add any additional props you might need
}

const UrlParamDetectWidget: React.FC<UrlParamDetectWidgetProps> = (props) => {
  const [currentUrl, setCurrentUrl] = useState<string>('');

  useEffect(() => {
    // Get the current URL when the component mounts
    const url = window.location.href;
    setCurrentUrl(url);
  }, []);

  return (
    <div>
      <h3>Current URL:</h3>
      <p>{currentUrl}</p>
    </div>
  );
};

export default UrlParamDetectWidget;

 

 

 

 

0 Kudos
JeffreyThompson2
MVP Regular Contributor

I built a widget like that yesterday. I am planning to post it on the Trips and Tricks Board today.

Here it is.

GIS Developer
City of Arlington, Texas
0 Kudos