I do not want all records of a layer's attribute table to be loaded into the attribute table. Can the config_Attribute Table.json be modified to limit results to the map extent by default, and only when the layer's scale range has been reached? Thanks.
Solved! Go to Solution.
I see the same results as you, Michael. The attribute table displays all records within the map extent, regardless of scale dependency or layer visibility. I'll leave it to experts (of which I am not) to say whether or not that can be adjusted.
Thanks Nick,
I did change this and it does work for only displaying data in your current extent by default.
However, if the data has a scale dependency and is not currently visible at that particular scale or is turn off in your layer list then the data is still listed in the Attribute Table.
Ideally, similar to how the Flex version of the Attribute Table works, if a layer is not turned on then the tab for that layer does not display in the Attribute table and if the layer is not at the visible scale then no data for that layer displays in the Attribute Table(fields are greyed out and "Layer is out of scale range" is displayed"), see image below.
Hope this makes sense.
Regards
Michael Potter et al does the WAB 1.3 Attrib Widget respect scale dependency?
Kevin,
I just finished testing and 1.3 still does not respect scale dependency or layers that are turned off.
I was really hoping 1.3 would provide this functionality but it does not look good.
Regards,
Michael
Nope, does not work.
Line numbers dont match either. There is only 1601 lines in the apps\##\widgets\AttributeTable\Widget.js
Michael,
In WAB 1.3 you will find the line to change at 148 and line 1159 (both are currently true so if you do not want the widget to use the maps extent by default then make them false).
Hi Robert,
Always a pleasure reading your posts! Very informative.
I am not using 1.3. Using 1.2
Id rather know the line of code rather than the LN for reference. As those LN do no good for 1.2
The below was changed as per njbarger post, which failed to work
changed this.matchingMap = false; TO this.matchingMap = true;
And
Changed this.matchingCheckBox = null; TO this.matchingCheckBox = true;
Hi Michael,
Those sections of code were for 1.1. There may be something else in the code that is controlling the behavior. I would make sure you clear your browser cache and I've also found I need to back out of WAB builder and get back into after making certain changes.
Ok...so a follow-up to the previous message. I changed line 143 this.matchingCheckBox = null; to this this.matchingCheckBox = true; and line 145 from this.matchingMap = false; to this this.matchingMap = true; and it works. The thing I am missing is that the check box does not show as being checked. When I click on the check box the record count doesn't change. When I uncheck the box the record count shows everything in the dataset.