Select to view content in your preferred language

Webhook payload not including DATE fields

582
9
05-02-2025 06:43 AM
DominicRobergeIADOT
Frequent Contributor

Hi,

I am using FME to pull payload from a webhook setup on Survey123. Everything is working fine, however, no DATE fields are returned in the payload:

below is the payload returned

{
   "applyEdits" : [
      {
         "id" : 0,
         "updates" : [
            {
               "attributes" : {
                  "status" : "Assigned",
                  "assignedto" : "BLABLABLA",
                  "globalid" : "e1c4c605-c4f1-4be0-8669-3d064abb2ea4",
                  "OBJECTID" : 45
               }
            }
         ]
      }
   ],
   "feature" : {
      "attributes" : {
         "actyear" : 25,
         "actidint" : 6,
         "actid" : "GRM2500006",
         "actcategory" : "Solutions",
         "acttype" : "Update GIS solution or application",
         "details" : "test",
         "urgent" : "No",
         "urgent_details" : null,
         "division" : "Administrative Services",
         "bureau" : "Human Resources",
         "plannedstartdt" : null,
         "plannedenddt" : null,
         "plannedeffort" : 0,
         "status" : "Assigned",
         "assignedto" : "BLABLABLA",
         "actualenddt" : null,
         "pocname" : "ESRI GISResourceMgmt",
         "pocemail" : "aBLABLABLA",
         "capabilities" : "Under Review",
         "orggoal" : "Under Review",
         "corepillar" : "Under Review",
         "prggoal" : "Under Review",
         "strategicaction" : null,
         "frameworkpillar" : null,
         "globalid" : "e1c4c605-c4f1-4be0-8669-3d064abb2ea4",
         "OBJECTID" : 45
      },
      "geometry" : null,
      "layerInfo" : {
         "id" : 0,
         "name" : "GIS_Activities",
         "type" : "Feature Layer",
         "globalIdField" : "globalid",
         "objectIdField" : "OBJECTID",
         "relationships" : [
            {
               "id" : 0,
               "name" : "Effort",
               "relatedTableId" : 2,
               "cardinality" : "esriRelCardinalityOneToMany",
               "role" : "esriRelRoleOrigin",
               "keyField" : "globalid",
               "composite" : true
            },
            {
               "id" : 1,
               "name" : "Comments",
               "relatedTableId" : 1,
               "cardinality" : "esriRelCardinalityOneToMany",
               "role" : "esriRelRoleOrigin",
               "keyField" : "globalid",
               "composite" : true
            }
         ]
      },
      "result" : {
         "globalId" : "e1c4c605-c4f1-4be0-8669-3d064abb2ea4",
         "objectId" : 45,
         "uniqueId" : 45,
         "success" : true
      },
      "attachments" : null
   },
   "eventType" : "editData"
}

 Data in 

DominicRobergeIADOT_0-1746193259776.png

DominicRobergeIADOT_1-1746193323522.png

So, what am I missing?

 

Thanks for any input

0 Kudos
9 Replies
AustinAverill
Frequent Contributor

I don't believe that WebHooks send those system fields... As part of your workflow you could authenticate to your organization and query the layer to pull those system fields out though.

0 Kudos
DominicRobergeIADOT
Frequent Contributor

ok, but I also have other DATE fields (not system fields) and those are not coming either

DominicRobergeIADOT_0-1746194648365.png

DominicRobergeIADOT_1-1746194775478.png

 

0 Kudos
Neal_t_k
Frequent Contributor

Depending on your needs, another option could be to just add a calculated date field to your survey form so a date comes through with your attributes.

Scratch that, I didn't refresh prior to submitting and didn't see your reply.  However could that payload could be one of the entries with no dates supplied?

0 Kudos
TylerGraham2
Frequent Contributor

You might try checking some of the additional Event data boxes to see if one of those includes the submitted on and last edited on fields because while those are in the feature service, they may not be considered part of the submitted record because those are handled behind the scenes and not part of the survey itself.    

0 Kudos
j-bromp
Frequent Contributor

try checking all of these:

jbromp_0-1746677104669.png
I just checked one of my payloads and i have created_date listed under the attributes:

jbromp_1-1746677319588.png

I have them all enabled on mine:

jbromp_2-1746677458731.png

 

 

 

0 Kudos
DominicRobergeIADOT
Frequent Contributor

well... never assume the obvious....

One issue was that the date fields were NOT included in the Survey (my bad I should have checked that first..I am taking over from a co-worker)....

But now, when I try to add these fields in the survey (read only) I get the following:

DominicRobergeIADOT_0-1746717077727.png

I did enabled all the options listed above , but still no go.

@j-bromp , how to you have the Created_date field setup in the Survey Connect?

0 Kudos
TylerGraham2
Frequent Contributor

You can't add fields to a survey created from an existing feature service when publishing updates.  You need to go to the feature service either in the AGOL environment or in ArcGIS Pro and then add the field to the feature service.  You'll then be able to reference it when designing your form.  

0 Kudos
DominicRobergeIADOT
Frequent Contributor

well I know that, I enabled feature access on the feature service with the following options:

DominicRobergeIADOT_0-1746717958886.png

I have the fields in the the feature service with values:

DominicRobergeIADOT_1-1746718091530.png

If I don't add them to the survey, they are not returned in the payload.

I just need then hidden (or I could probably do with read only)

DominicRobergeIADOT_2-1746718493799.png

 

0 Kudos
j-bromp
Frequent Contributor

@DominicRobergeIADOT ,

you might need to change the submission url in the settings tab of the survey to something like this:

https://yourPortalUrl/server/rest/services/Hosted/service_yourService/FeatureServer

I have a bunch of date fields in my survey actually, one is a dateTime field that defaults to now(), and the others are utc offset corrections and formatted versions.

0 Kudos