I am trying to query a boat ramp database and none of the dropdown menus will populate with the unique values from the field. The layer is loading and the values are visible when I configure the clause in the Expression Builder.
However, when turn on live view, or open the preview and try and select from the menu, the values won't load:
This has been worked just fine until today, so I have no idea what to do. I tried deleting the widget and starting over but got same results. Also, I have two other Query widgets configured with other map layers and I don't have this issue. Also, if I add multiple expressions none of them will populate. It can't be an issue with the data, because it loads in the map:
Has anyone else had this issue or may know what is causing it?
Solved! Go to Solution.
I wanted to post more info about this issue because I have isolated the cause. This seems to be isolated to the Query widget and occurs whenever there is a map action that filters a map layer and the action applies to the Framework. For some reason, the Query widget is not able to access the filtered records in order to populate the dropdown menu, but I have found a work-around!
As an example, If I wish to create a Filter action for Extent changes, in the Map Action pane I Select 'Add a trigger'/Extent changes/Framework/Filter data records. After selecting the data, in the dropdown I select 'Create a view'. Once the view is created I make sure it is selected in the dropdown under the Action data layer. Now the map will filter the view and not the map layer. Since I only wanted to filter the Attribute table, I can now go to the table Content pane, open the table Data configuration and select the view of the data as opposed to the 'default' setting. Now, only the table will be filtered and the Query widget isn't affected since it is looking at the map layer and not a view and the menu will populate as expected.
I hope this helps for anyone having the same issue.
I encounter this issue all the time... in both the list and query widgets. They are very finicky, especially with record sets >2000 rows, which is the default batch size from a hosted feature service - the max record count = 2000, regardless if I set the hosted feature layer max record count to be say 4000.
I do not have a solution and it is very frustrating, especially when I am trying to keep more than 2 widgets in sync.
Say a list, a feature info and the map widgets. If I create view sources for the list and feature info, they remain in sync during filtering. But the map widget won't stay in sync because it has to use the default layer source in order to draw the correct feature and return the same feature in it's popup as is returned in the feature info and/or list....
Thanks for the info. I think in my case it may have had something to do with an action that I had configured for a table widget. I noticed that the issue with the dropdown started to occur after I configured a table widget to sync with selections, or query results. Still not sure if this is what was causing the query menu not to populate, but when I removed all of the table actions, the problem went away. I still need to figure out a way to sync a table with the query results without the dropdown menu being affected, but if I do I will be sure to post the solution.
This seems similar to what I posted about 2 years ago:
I asked about it again at the Developer Summit 6 months later. It seemed there was a significant architectural problem and it would be quite some time before it would be resolved. @TonghuiMing and/or @Jianxia , could you please tell us if we are still in the same holding pattern, or do you have some indication as to when this might get fixed? If this is not going to be resolved reasonably soon, perhaps some guidance in the Actions section of the documentation would be appropriate.
Yes, this seems identical to the same issue you were having, the only difference is that I am filtering the map by selection. I will be sure to post an update as I attempt to work through the issue.
I wanted to post more info about this issue because I have isolated the cause. This seems to be isolated to the Query widget and occurs whenever there is a map action that filters a map layer and the action applies to the Framework. For some reason, the Query widget is not able to access the filtered records in order to populate the dropdown menu, but I have found a work-around!
As an example, If I wish to create a Filter action for Extent changes, in the Map Action pane I Select 'Add a trigger'/Extent changes/Framework/Filter data records. After selecting the data, in the dropdown I select 'Create a view'. Once the view is created I make sure it is selected in the dropdown under the Action data layer. Now the map will filter the view and not the map layer. Since I only wanted to filter the Attribute table, I can now go to the table Content pane, open the table Data configuration and select the view of the data as opposed to the 'default' setting. Now, only the table will be filtered and the Query widget isn't affected since it is looking at the map layer and not a view and the menu will populate as expected.
I hope this helps for anyone having the same issue.
Amazing! Thank you so much for posting this.