Suppose I have a WAB widget (version 1.2) called TaskManager. Everytime a user clicks a button (triggering a click event) I want to route it to a function that will update a specific field called 'lastupdated' in a REST Service (FEATURE Service) table called SuprojectTypeTable, which looks like this in my widget config,json:
"subprojectTaskTrackingURL": "https://www.mywabapp.com/server/rest/services/.../FeatureServer",
"subprojectTypeTable": {
"index": "5",
"oid": "objectid",
"subprojectName": "subproject",
"projectType": "projecttype",
"lastUpdated": "lastupdated"
},
This function will take one parameter, a subprojectName, so that it can update the specific row in the table that I want. It will also call a simple function that will get, format, and return the current date. This will be the value I want to plug into the 'lastupdated' field: