I've been fighting this problem here recently and hoping someone has a good workaround:
Problem:
1) When I configure the attribute table widget from within WAB Dev 2.10 or 2.11, the order of layers will NOT match the order in the Portal web map.
2) After saving my edits (which layers I want visible in attribute table), the config .json file will be scrambled. The "name" and "id" keys will match the order of layers in the Portal web map; however, everything within all the other keys for that layer will match the order and configurations that I set in the WAB UI.
3) The result is an attribute table that will not load attributes. If I manually fix the mis-matches (give the proper "name" and "id" keys), then it will work.
4) If I go back into WAB and try to reconfigure in WAB's UI again, it either won't load at all (2.10) or the layers will be in the proper web map order now (2.11) but upon reconfiguring and saving, I find that the .json is still scrambled.
I thought it might be some kind of problem with adjustments made to an existing Portal web map, so I tried everything from scratch (new Portal web map, new WAB app) and got the same results.
Anyone else experience this issue?
P.S. While I'm at it - why is the default "sort" column for so many of my layers the "SHAPE" field? SQL can't do this unless you convert to string... this shouldn't even be an option, right? How are these defaults selected? Sometimes it picks a data column but most of the time it chooses OBJECTID or SHAPE. Perhaps it's number ordered when the file is first built and the problem is related to the layer scrambling?