Hello,
I have hosted a feature layer which is a part of web-map for indoors, and I am trying to add a new field in the attributes table from the client side. For this I have created a new field using the ArcGIS "Field" constructor, added it to the layer's fields array, and then used the save() method, however this is not working for me.
Can someone suggest a solution for it or what am I missing in this process?
I don't think it's possible to add a field to a hosted feature layer using the ArcGIS Maps SDK for JavaScript directly. You could possibly use the ArcGIS API for Python to create a geoprocessing tool that adds a field, host that geoprocessing tool as a geoprocessing service, then call that GP service from JS.
Thank you @BlakeTerhune for your valuable response.
I just wanted to confirm if this also applies to the renderer(wants to update the renderer). Could you please clarify?