<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Adding a row to a table using JS 4.x in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1603539#M86841</link>
    <description>&lt;P&gt;It looks like "roomEditData" is an array of objectIDs.&amp;nbsp; In that case, you'd want something like this instead of what you presently have on lines 4-10:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const updates = [];
roomEditData.forEach(function(oid) {
	updates.push ({
		attributes: {
			OBJECTID: oid,
			PHYSICALCAPACITY: document.getElementById ('editroomDetails-PHYSICALCAPACITY').value
		}
	});
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That assumes that the OID field name for the layer is actually "OBJECTID".&amp;nbsp; If it isn't, you'll need to change the field name on line 5.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Apr 2025 00:10:28 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2025-04-08T00:10:28Z</dc:date>
    <item>
      <title>Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1560808#M86108</link>
      <description>&lt;P&gt;I was using JS 3.x to add and update data. I am working on convert my applications to JS 4.x.&amp;nbsp; I had a script that used "dojo/Deferred". Here is the code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function _applyAdds (featureLayer, propertiesArr)
{
    var defer;
    require (['esri/graphic', "dojo/Deferred"], function (Graphic, Deferred)
    {
        defer = new Deferred ();
        var graphicsArr = [];
        propertiesArr.forEach (function (properties)
        {
            graphicsArr.push (new Graphic (null, null, properties));
        });
        featureLayer.applyEdits (
                graphicsArr, null, null,
                function (a, u, d)
                {
                    console.log (a, u, d);
                    defer.resolve ();
                }, // callback
                function (error)
                {
                    console.log ('ERROR!', error);
                }// errorback
        );
    });
    return defer.promise;
}

//begin adding new employee assignment
function assignEmployee ()
{
    var addEmployee = {};
    addEmployee.SPACEKEY = document.getElementById ('EmployeeSpaceID').value;
    addEmployee.EMPLOYEEKEY = document.getElementById ('EmployeeID').value;
    console.log (addEmployee);
    _applyAdds (roomAssinmentTable, [addEmployee]).then (function ()
    {
        console.log ("Add Employee");
    });
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i make this work in JS 4.x?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for any help on this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 16:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1560808#M86108</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2024-11-20T16:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1560878#M86109</link>
      <description>&lt;P&gt;You should use the native &lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" target="_self"&gt;Promise&lt;/A&gt; object instead.&amp;nbsp; Here is what the above code would look like using it:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function _applyAdds (featureLayer, propertiesArr)
{
    return new Promise(function(resolve, reject) {
        require (['esri/graphic'], function (Graphic)
        {
            var graphicsArr = [];
            propertiesArr.forEach (function (properties)
            {
                graphicsArr.push (new Graphic (null, null, properties));
            });
            featureLayer.applyEdits (
                    graphicsArr, null, null,
                    function (a, u, d)
                    {
                        console.log (a, u, d);
                        resolve();
                    }, // callback
                    function (error)
                    {
                        console.log ('ERROR!', error);
                        reject(error);
                    }// errorback
            );
        });
    });
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 18:11:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1560878#M86109</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-11-20T18:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1561051#M86112</link>
      <description>&lt;P&gt;Thank you, Joel, for helping. I am now getting this error message:&lt;/P&gt;&lt;P&gt;4.30/:31 Error: scriptError: &lt;A href="https://js.arcgis.com/4.30/esri/graphic.js" target="_blank"&gt;https://js.arcgis.com/4.30/esri/graphic.js&lt;/A&gt;&lt;/P&gt;&lt;P&gt;src: dojoLoader&lt;/P&gt;&lt;P&gt;info: (2)&amp;nbsp;['&lt;A href="https://js.arcgis.com/4.30/esri/graphic.js" target="_blank"&gt;https://js.arcgis.com/4.30/esri/graphic.js&lt;/A&gt;', Event]&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 22:34:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1561051#M86112</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2024-11-20T22:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1561056#M86113</link>
      <description>&lt;P&gt;I thought you were asking specifically about the replacement for dojo's Deferred module.&amp;nbsp; To migrate the whole function, you'll also need to update the use of FeatureLayer and Graphic for compatibility with 4.x:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function _applyAdds (featureLayer, propertiesArr)
{
    return new Promise(function(resolve, reject) {
        require (['esri/Graphic'], function (Graphic)
        {
            var graphicsArr = [];
            propertiesArr.forEach (function (properties)
            {
                graphicsArr.push (new Graphic ({attributes:properties}));
            });
            featureLayer.applyEdits({addFeatures:graphicsArr}).then(
                    function (results)
                    {
                        console.log (results);
                        resolve();
                    }, // callback
                    function (error)
                    {
                        console.log ('ERROR!', error);
                        reject(error);
                    }// errorback
            );
        });
    });
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 22:45:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1561056#M86113</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-11-20T22:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1561070#M86114</link>
      <description>&lt;P&gt;Thank you! That works. I really appreciate your help.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 23:12:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1561070#M86114</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2024-11-20T23:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1567985#M86246</link>
      <description>&lt;P&gt;Joel,&lt;/P&gt;&lt;P&gt;If i want to delete or just edit do i change this line:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;featureLayer.applyEdits({addFeatures:graphicsArr})&lt;/LI-CODE&gt;&lt;P&gt;to deleteaFeatures and&amp;nbsp;editFeatures?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 18:21:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1567985#M86246</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2024-12-12T18:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1568024#M86248</link>
      <description>&lt;P&gt;To edit features, you would use:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;featureLayer.applyEdits({updateFeatures:graphicsArr})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To delete features, you would use:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;featureLayer.applyEdits({deleteFeatures:graphicsArr})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 18:56:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1568024#M86248</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-12-12T18:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1568045#M86252</link>
      <description>&lt;P&gt;That is what i thought. i had been trying it but was getting this error:&lt;/P&gt;&lt;P&gt;ERROR! e&amp;nbsp;{name: 'request:server', details: {…}, message: 'Unable to complete operation.'}details: getAllHeaders: ()=&amp;gt;Array.from(Z.headers)getHeader: ra=&amp;gt;Z.headers.get(ra)httpStatus: 500messageCode: undefinedmessages: ["No edits ('adds', 'updates', 'deletes', 'attachment edits', or 'asset maps edits') were specified."]raw: {code: 500, message: 'Unable to complete operation.', details: Array(1)}requestOptions: {method: 'post', query: {…}, responseType: 'json'}ssl: truesubCode: undefinedurl: "&lt;A href="https://uwoperations.uwyo.edu/hostgis/rest/services/REO/REV_UWOPS_EditRooms/FeatureServer/1/applyEdits" target="_blank"&gt;https://uwoperations.uwyo.edu/hostgis/rest/services/REO/REV_UWOPS_EditRooms/FeatureServer/1/applyEdits&lt;/A&gt;"[[Prototype]]: Objectmessage: "Unable to complete operation."name: "request:server"[[Prototype]]: ctype: "error"constructor: class etoJSON: toJSON(){if(null!=this.details)try{return{name:this.name, message:this.message,details:JSON.parse(JSON.stringify(this.details,(d,p)=&amp;gt; {…}[[Prototype]]: Object&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 19:24:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1568045#M86252</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2024-12-12T19:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1568108#M86253</link>
      <description>&lt;P&gt;joel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got it to work. I was forgetting to grab the OBJECTID for the edit and delete. Thanks again!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 20:33:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1568108#M86253</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2024-12-12T20:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1592382#M86628</link>
      <description>&lt;P&gt;How would i be able to pass multiple OBJECTIDS to edit in batch with the code above?&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is what i am using to grab information from a popup window:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function editRoomData ()
{
    roomObjectID = attributes.OBJECTID
    console.log (roomObjectID);
    var editRoom = {};
    editRoom.OBJECTID = Number (roomObjectID)
    editRoom.ADA = document.getElementById ('roomDetails-ADA').value;
    editRoom.CAPACITY = document.getElementById ('roomDetails-CAPACITY').value;
    editRoom.SPACETYPECAT1KEY = document.getElementById ('roomDetails-SPACETYPECAT1KEY').value;
    editRoom.SPACETYPECAT2KEY = document.getElementById ('roomDetails-SPACETYPECAT2KEY').value;
    editRoom.SPACEUSECAT1KEY = document.getElementById ('roomDetails-SPACEUSECAT1KEY').value;
    editRoom.SPACEUSECAT2KEY = document.getElementById ('roomDetails-SPACEUSECAT2KEY').value;
    editRoom.DESCRIPTION = document.getElementById ('roomDetails-DESCRIPTION').value;
    editRoom.CAPACITY = document.getElementById ('roomDetails-CAPACITY').value;
    editRoom.ASSIGNABLE = document.getElementById ('roomDetails-ASSIGNABLE').value;
    editRoom.NOTES = document.getElementById ('roomDetails-NOTES').value;
    editRoom.USABLE = document.getElementById ('roomDetails-USABLE').value;

    _applyEdits (roomsTable, [editRoom]).then (function ()
    {
        $ ('#customWindow').jqxWindow ('close');
        $ ('#typeUseCategoryWindow').jqxWindow ('close');
        view.popup.close ()
    });
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Mar 2025 18:04:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1592382#M86628</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2025-03-05T18:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593477#M86642</link>
      <description>&lt;P&gt;If you want to set multiple features to have the same attribute values, you could do so with a function like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function _applyUpdates (featureLayer, attributes, objectIds)
{
    return new Promise(function(resolve, reject) {
        var query = featureLayer.createQuery();
        query.returnGeometry = true;
        query.objectIds = objectIds;

        featureLayer.queryFeatures().then(function(featureSet) {
            if (attributes.hasOwnProperty(featureLayer.objectIdField))
                delete attributes[featureLayer.objectIdField];

            featureSet.features.forEach(function(feature) {
                Object.assign(feature.attributes, attributes);
            });

            featureLayer.applyEdits({updateFeatures:featureSet.features}).then(
                function (results)
                {
                    console.log (results);
                    resolve();
                }, // callback
                function (error)
                {
                    console.log ('ERROR!', error);
                    reject(error);
                }// errorback
            );
        });
    });
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You would then determine the records you want to update, and create an Array of their objectID values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var objectIds = [1,2,3,4,5];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you could call the function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;_applyUpdates(roomsTable, editRoom, objectIds);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 20:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593477#M86642</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2025-03-07T20:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593509#M86643</link>
      <description>&lt;P&gt;Joel,&lt;/P&gt;&lt;P&gt;I am getting this error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Uncaught (in promise) ReferenceError: features is not defined&lt;/P&gt;&lt;P&gt;at this line&lt;/P&gt;&lt;P&gt;featureLayer.applyEdits({updateFeatures:features}).then(&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 19:38:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593509#M86643</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2025-03-07T19:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593540#M86644</link>
      <description>&lt;P&gt;My bad, line 16 above should be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;featureLayer.applyEdits({updateFeatures:featureSet.features}).then(&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll change it in that post too.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 20:09:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593540#M86644</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2025-03-07T20:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593543#M86645</link>
      <description>&lt;P&gt;Thanks! However, i am getting a new error. I cxan edit a single record so not sure what is going on?&amp;nbsp;&lt;/P&gt;&lt;P&gt;baseQueries.js:120 ERROR! e&amp;nbsp;{name: 'request:server', details: {…}, message: 'Unable to load &lt;A href="https://uwoperations.uwyo.edu/hostg…" target="_blank"&gt;https://uwoperations.uwyo.edu/hostg…&lt;/A&gt;EditLayers/FeatureServer/9/applyEdits status: 500'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 20:20:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593543#M86645</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2025-03-07T20:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593545#M86646</link>
      <description>&lt;P&gt;Are you able to log into ArcGIS Server Manager for that instance?&amp;nbsp; If so, the logs may contain more information.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 20:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593545#M86646</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2025-03-07T20:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593563#M86647</link>
      <description>&lt;P&gt;The logs report this:&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;Error executing tool. ReportCacheStatus : ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds. ArcGIS Server requires a service type (ParentType) and a server object extension type (Type). Failed to execute (ReportCacheStatus)." -&amp;nbsp;System/ReportingTools.GPServer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I will see if i can track down this error. Seems odd it works on a single record. Console reports it is happening at this line:&lt;/P&gt;&lt;P&gt;featureLayer.applyEdits({updateFeatures:featureSet.features}).then(&lt;/P&gt;&lt;P&gt;next line it fails is:&lt;/P&gt;&lt;P&gt;featureLayer.queryFeatures().then(function(featureSet) {&lt;/P&gt;&lt;P&gt;then:&lt;/P&gt;&lt;P&gt;return new Promise(function(resolve, reject) {&lt;/P&gt;&lt;P&gt;and lastly:&lt;/P&gt;&lt;P&gt;_applyUpdates(roomsTable, batchEditRoom, objectIds).then (function ()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 21:28:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593563#M86647</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2025-03-07T21:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593574#M86648</link>
      <description>&lt;P&gt;The logs report this:&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;Error executing tool. ReportCacheStatus : ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank" rel="nofollow noopener noreferrer"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds. ArcGIS Server requires a service type (ParentType) and a server object extension type (Type). Failed to execute (ReportCacheStatus)." -&amp;nbsp;System/ReportingTools.GPServer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I will see if i can track down this error. Seems odd it works on a single record. Console reports it is happening at this line:&lt;/P&gt;&lt;P&gt;featureLayer.applyEdits({updateFeatures:featureSet.features}).then(&lt;/P&gt;&lt;P&gt;next line it fails is:&lt;/P&gt;&lt;P&gt;featureLayer.queryFeatures().then(function(featureSet) {&lt;/P&gt;&lt;P&gt;then:&lt;/P&gt;&lt;P&gt;return new Promise(function(resolve, reject) {&lt;/P&gt;&lt;P&gt;and lastly:&lt;/P&gt;&lt;P&gt;_applyUpdates(roomsTable, batchEditRoom, objectIds).then (function ()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 22:33:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593574#M86648</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2025-03-07T22:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593598#M86649</link>
      <description>&lt;P&gt;A few things to check:&lt;/P&gt;&lt;P&gt;1) Make sure this data is going to the right layer in the service.&lt;/P&gt;&lt;P&gt;2) Make sure all the fields are named correctly and exist in the service.&amp;nbsp; Field names are case sensitive.&lt;/P&gt;&lt;P&gt;3) The OBJECTID field shouldn't be included in the attributes you capture from the form.&amp;nbsp; Lines 9 and 10 in the code I wrote are supposed to strip it out if it's present.&amp;nbsp; I suppose the server could generate an error if multiple update records were supplied with the same objectID values.&amp;nbsp; For reference, since it's on a different page now, here's the code where you capture the values from the form:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    editRoom.OBJECTID = Number (roomObjectID)
    editRoom.ADA = document.getElementById ('roomDetails-ADA').value;
    editRoom.CAPACITY = document.getElementById ('roomDetails-CAPACITY').value;
    editRoom.SPACETYPECAT1KEY = document.getElementById ('roomDetails-SPACETYPECAT1KEY').value;
    editRoom.SPACETYPECAT2KEY = document.getElementById ('roomDetails-SPACETYPECAT2KEY').value;
    editRoom.SPACEUSECAT1KEY = document.getElementById ('roomDetails-SPACEUSECAT1KEY').value;
    editRoom.SPACEUSECAT2KEY = document.getElementById ('roomDetails-SPACEUSECAT2KEY').value;
    editRoom.DESCRIPTION = document.getElementById ('roomDetails-DESCRIPTION').value;
    editRoom.CAPACITY = document.getElementById ('roomDetails-CAPACITY').value;
    editRoom.ASSIGNABLE = document.getElementById ('roomDetails-ASSIGNABLE').value;
    editRoom.NOTES = document.getElementById ('roomDetails-NOTES').value;
    editRoom.USABLE = document.getElementById ('roomDetails-USABLE').value;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Mar 2025 01:31:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593598#M86649</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2025-03-08T01:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593855#M86658</link>
      <description>&lt;P&gt;Joel,&lt;/P&gt;&lt;P&gt;let me see if this is what you mean here is the Batch Edit function that i use to pass to the _applyUpdates:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function batchEditRoomData ()
{
    var objectIds = roomEditData;
    var batchEditRoom = {}; 
    batchEditRoom.NOTES = document.getElementById ('editroomDetails-NOTES').value;
     _applyUpdates(roomsTable, batchEditRoom, objectIds).then (function ()
    {
        console.log ("Batch Edit Room");
    });
    
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I grab the OBJECTIDs from the table of&amp;nbsp; the selected records . I still seem to be getting an error . I am only using the NOTES field for this test, by the way.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="editBatch_A.PNG" style="width: 182px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127495i54D12E5ED72E952C/image-size/large?v=v2&amp;amp;px=999" role="button" title="editBatch_A.PNG" alt="editBatch_A.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="editBatch_B.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127496i99F71CE8553F5C94/image-size/large?v=v2&amp;amp;px=999" role="button" title="editBatch_B.PNG" alt="editBatch_B.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 16:27:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1593855#M86658</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2025-03-10T16:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row to a table using JS 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1594554#M86671</link>
      <description>&lt;P&gt;That looks fine as far as I can tell.&amp;nbsp; You might want to check out the Network Tab of the developer tools and look into the details of the request sent to applyEdits.&amp;nbsp; Particularly, check out the payload to make sure everything looks proper in there.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 23:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1594554#M86671</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2025-03-11T23:21:43Z</dc:date>
    </item>
  </channel>
</rss>

