Attribute search from url, HTML5 viewer
I found the post below about the attribute search from URL, but it is for Silverlight viewer. We don't use Silverlight viewers at all.
https://support.geocortex.com/how-to-perform-an-attribute-search-from-a-url
Has anyone done something similar with the HTML5 viewer?
Thank you, Nataliya
-
I had the same question. I had to make a startup workflow. Here is my thread:
https://support.geocortex.com/SupportForums/Thread.aspx?thread=58881&mid=2&pageid=0&ItemID=2
0 -
Thanks, Ethan. Did you get the workflow working? Would you be willing to share it. I am a newbie to the workflows.
0 -
it was pretty much my first workflow and yes it works with a slight caveat: I'm launching our HTML5 viewer from our salesforce app and about 25% of the time i get an error that the workflow couldn't start. If I refresh the HTML5 viewer page (without making any changes to the url), it then works. i don't know why this happens, but my guess is that when the workflow fires, the page isn't fully loaded. It hasn't happened enough for me to start noticing any trends that could help narrow it down. I just tell users to refresh if they see the message. I used the startup query example in the code gallery as a starting point. https://support.geocortex.com/startup-query-workflow
0 -
Ethan,
I got the 'Startup Query workflow' to wor k. It will work on the start up just fine. I am excited! Below are my parameters for parcels layer. Now I am wondering how would I add this to the URL?
Below is what I tried (but it's doesn't work)? Did you get the URL part to work?
http://myServer/Html5Viewer/Index.html?configBase=http://myServer/Geocortex/Essentials/REST/sites/Test/viewers/HTMLtest/virtualdirectory/Resources/Config/Default&queryLayerMapServiceId=1&queryLayerName=Parcels&query=PIN%3D0116340000
? /customer/servlet/servlet.FileDownload?file=00P6000000elTNgEAM
Thank you for your help.
0 -
Your screen looks different than mine. I'm using GCE 4.3.1 and the 2.4.1 viewer.
I have the options for "Display Name", "ID", and "URI" which is where the xaml file is referenced.
then in your url, you need to tell it what workflow to run with the &runWorkflow=[workflowID] parameter. Something similar to this:
http://myserver/html5viewer/?viewer=myviewer&runWorkflow=myworkflow&MapServiceID=1&LayerName=mylayername&query=field=%27value%27
0 -
Awesome. I got it. I was missing &runWorkflow=myworkflow part.
Appreciate all your help.
0 -
Thanks for your help Ethan! In regards to the comment you made about the workflow not starting 25% of the time, there's something you can try to test your theory. Have a look at the help for the ExternalDelay Activity. If you add a second or two of delay to the start of the workflow, that should help you prove your theory about the workflow trying to fire before the page finishes loading.
Hope that helps!
Danny Briggs
0 -
I got the URL parameters working, but it only works for Map services and not a feature services? Has anyone got it working for the feature services? Thank you.
0 -
Ethan,
I am not sure if you got this workflow working for the Feature Service, if not, I got a solution. When ever I would try to run it for the Feature Service I would get an error saying to "Check if the Layer is a Dynamic layer". So to get it to work, I opened the workflow in the "Workflow Designer" and in the in the "sequence" box where it says "Check if the Layer is s Dynamic Layer" I change "Condition" to "False". Then in the "Query Dynamic Layer" box I changed "Query Service Url" to the following - String.Format("{0}/{1}", serviceUrl, queryLayerId).
_img_ alt="Workflow changes" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907600000000R7k&feoid=Body&refid=0EM60000000DDs3" _/_img_
Finally, in the actuall url parameters instead of layerName, I used layerId:
http://MYSITE/Html5Viewer/Index.html?configBase=http://MYSITE/Geocortex/Essentials/REST/sites/NAME/viewers/NAME/virtualdirectory/Resources/Config/Default/&runWorkflow=test&LayerMapServiceId=20&LayerId=0&query=LOC_NAME=%27YMCA%20Twin%20Rivers%27
I hope that helps.0 -
Has anyone tried using this workflow with preset queries on a layer? I'm wondering if it can be modified to have a queryId=1 or something. 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
10 Kommentare