EditTable Table Editing Widget for Web App Builder 2.5+

7016
14
06-22-2018 01:41 PM
AdamDrackley
Occasional Contributor III

Hey all, hope things are well.  I've been working on a widget to allow for editing tables in the Web App Builder via the Attribute Table widget, and I've got a promising prototype working in the repo below.  I hope to continue improving this tool in the future, but it's a good start so far.  Testing on versions above 2.5 would be appreciated.

GitHub - cmndrbensisko/EditTable: The EditTable Widget for ArcGIS Web AppBuilder allows for editing ... 

Note that this widget requires the use of the LocalLayer widget to add Table sublayers in FeatureServices to your map as Feature Layers.  More information about this widget below.

https://community.esri.com/thread/119548-locallayerwidget-and-accessifizrwidget 

Look forward to your feedback!

14 Replies
PamBond1
New Contributor III

Do you think this widget would also facilitate the editing of feature layer attribute in a table? (I was a bit surprised you cannot already do this in Web App Builder).

AbiDhakal
Occasional Contributor III

Hey Adam,

I have two questions; One, it seems like you have to have the feature associated table as a service as well. Does that mean bringing dbf as a table service?  Two, this then will have to be a customized Web AppBuilder app. You mention GitHub. It will not be an out of the box Web AppBuilder app, right?

Thank you.

Abi

0 Kudos
KellyFarley
New Contributor

Has anyone implemented this widget with 10.6.1?  Any issues?

0 Kudos
DonMorrison1
Occasional Contributor III

I'm looking for a widget exactly as this is describe. I downloaded it from git and installed it on my instance of WebAppBuilder and it looks good, except I can't get it to add a new record (which is the function that I really need the most).  From the code it looks like maybe you hadn't gotten to this yet. I'm a complete novice on JavaScript - so I have high hopes that this will work out for me.  Is there a newer version that supports add - or am I missing something with this 2.5 version? Thanks!

var addFeature = esriRequest({
 url: addUrl,
 content: {
 f: "json"
 },
 handleAs: "json",
 content: {
 adds: '[{"id":222,"adds":[],"updates":[],"deletes":[]}]',
 f: "json"
 }
 }
0 Kudos
AnnaMorris1
New Contributor

Hi Don,

Did you happen to make any progress with finding a means to add a new record? I am also a JavaScript novice but need to figure out how to add new related records, instead of just being able to edit existing records.

Thanks,

Anna

0 Kudos
DonMorrison1
Occasional Contributor III

Hi Anna - I did not make any progress on this widget. I ended up creating some python toolbox tools to help users add records and related records to our database.  This has turned out to be very difficult and complicated to develop, and not a very nice user interface. Other than than it works great. These tools only run in the ArcGIS Pro client - we would have like to have provided a web interface.

0 Kudos
AnnaMorris1
New Contributor

Thanks for the reply Don - yet it's proving to be quite complicated!

0 Kudos
SamSimpson
New Contributor III

Hello, I'm trying to implement this widget but keep receiving the error "Table is either not a table or not editable". I added the layer via the LocalLayer widget and the layer is editable so I do not understand why the widget will not read this layer.

I am also very new to Java so there could be some basic underlying issues. For instance, I don't understand if this opening function is necessary for me to fill out:

Both times when I have used my server/domain and when I have left this enactive I have received the same error message in WAB saying the table is not editable.

Are there other configurations I am missing in the EditTable widget's code?

Thank you

0 Kudos
DonMorrison1
Occasional Contributor III

I didn't have to change any code to get it to work for me (except the add new record does not work as advertised) so you shouldn't have to worry about the comments in the onOpen function.  It was only a couple of weeks ago but I can't remember if I had to do any tricks to get it to work.  Do you have at least one spatial layer in your feature service? I think I had to add a dummy spatial layer to get it to work. This is from the readme file: Note that at least one spatial layer is currently required to be added to your map via the LocalLayer widget for the map to load.

0 Kudos