In the query widget in the Web AppBuilder, I am trying to get one of the result fields to display as a hyperlink, but I am having trouble.
In the “Results Setting” tab in the query widget, I’ve set the URL field’s Special Type as “Link”. I click OK and save the Web App.
When the query is run, the results display the field, but the hyperlink is not active. Nor is the hyperlink active in the pop up when one of these results is clicked on the map.
However, the link is active if the result layer’s attribute table is open.
If I go back to edit mode in the query widget, the Special Type for the field is back to “None”. The “Link” type does not hold.
Is there a way to get the Special Type to remain “Link”? I don’t believe it is a problem with the URL itself, as the hyperlink is activated and working in the attribute table.
p.s. The app is using a Map Service that was uploaded onto AGOL from a local server.
Kirk,
The pop-up is configured in the web map. Did you set it as a link?
Regards,
Tom
Tom,
The problem is not with the layer's pop-up, but with the query result layer's pop-up (which isn't a layer until the query widget is run in the web app). It is my understanding that this pop-up is configured in the edit mode of the query widget, under the "Results Settings" tab.
Thanks,
Kirk
Some digging on Google led me to find a great page discussing this exact problem:
Query Widget Result Item Contents
Basically, it is a bug, and must be manually changed in the json file. See the link for a full explanation.
Hi Kirk,
It's a bug of Query widget in last release version. The bug will be fixed in next release.
For now, the workaround is to change the json file manually as you said.