Has anyone been able to use URL Parameter to query a feature in WAB? I’m trying to follow the documentation located here https://doc.arcgis.com/en/web-appbuilder/manage-apps/app-url-parameters.htm under the Query Feature sections. ESRI support logged BUG-000094358 because they were not able to successfully query a feature in WAB either. I don’t understand why documentation would be created for something that’s not possible. I would think it would be tested before it was published.
I did it.
Unfortunately for this situation, it's in an internal map. So I can't share. I'll try to put together a walkthrough soon. The key is 'feature service' and in the Product page for your AGOL map based off of the feature service you create your connections there.
We had it working for a while (couple of months) in our WAB, but then it broke just the other day. The documentation that was provided by ESRI was not exactly correct. ESRI Tech support had some kind of fix for us, but like I said, it broke on me two days ago.
No. I am referring to a real time.
For example you have a url like this
Then have widget that starts up when your app opens and in that widget under the startup function read the url parameter
and perform any actions you want similar to this:
urlSubstring = location.search.substring(1);
var myparams1 = urlSubstring.split('?');
urlSubstring = myparams1;
so you require the query widget to exist in the web app (or a custom widget)?
I guess my other question would be is, why? Is there a particular scenario where URL Query(as intended) does not work? We use URL Query and have no issues so I am a bit confused why one would go through this trouble.
I wrote this script some time ago when there was no url query widget. However, this approach is very useful dynamic apps. So, when you have the user to make choices by selecting variables in drop down boxes or typing something in a textbox. Then, you grab those variables and on the fly you create a url where you append these selected variable and you call the url using a custom config file. Bear in mind that based on the selections you can also in script can specify with config.json file to use. All that can happen behind the scenes after the user make their selections on a webpage and produce a customized map.
Trying to understand what is meant here. Though I have never had an issue with the URL Query with 2.1 (we did with 1.3 not showing attributes from a layer that is part of a group layer).
Sounds like a lot of unnecessary custom coding if that is the case.
Perhaps you mean that you, as a user, simply look at the URL and hope that the layer, field and field value has been configured in the query (ability to add those) widget for you to manually do.
I would not consider this user friendly at all, and worse yet, would have to force business rules to a 'must have query widget' and must have xxx conditions.
But perhaps you mean something else...
If you can elaborate that would be great!