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.
Mike and Rebecca,
There is not configuration option for this but it is a really simple one line code change if you are using the WAB Dev version.
client\stemapp\widgets\AttributeTable\widget.js line 185.
this.matchingMap = false;
change to:
this.matchingMap = true;
I have the same question....specifically in the WAB dev edition for me. And using some of Robert Scheitlin, GISP custom widgets.
Mike and Rebecca,
There is not configuration option for this but it is a really simple one line code change if you are using the WAB Dev version.
client\stemapp\widgets\AttributeTable\widget.js line 185.
this.matchingMap = false;
change to:
this.matchingMap = true;
Robert, that worked great.
Note: Of course it does not transfer forward to existing apps, so if anyone else uses this, remember to also update your \server\apps\<app#>\widgets\AttributeTable\widget.js
Interesting observation of odd behavior, even though it definitely works, the Options checkbox started off as unchecked. Checking didn't seem to change anything the first time...but doing it a few times did. So, the togle timing is a bit strange, but not an issue in my opinion, since I would rather have it always filtered.
EDITED: Not totally strange behavior, its just the initial checkbox isn't checked. After code modification, firing up the app and revieiwing attribute table:
- filter box unchecked, but table filtered (minor graphical issue)
- manually check the box - table filtered, as expected
- manualy uncheck the box - table goes back to being unfiltered.
so, just a very minor checkbox thing.
I can't mark your answer as "correct", but hopefully Mike will after he's tested.
That is beautiful! Thank you Robert. Worked like a charm. I appreciate your help. Thanks also Rebecca.
In WAB 2.11 where is this option?
change to:
George,
In more recent versions like 2.10 you do not need to make any code change this is an option in the widgets settings page.
oops, i should have read the whole thread, thanks.
You can also change the following line of code so that the box appears checked.
line 1963 this.matchingcheckbox=true
This will keep the functionality consistent... i.e. you won't have to check the box and uncheck the box to turn off the spatial filter
Does the Attribute Table widget limit the results when the layer's scale range has not been reached?
Regardless of whether I am using a Web Map or Local Layers, my Attribute Table displays all features in that extent, even if the layer is turned off and not yet at a visible scale range.