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
So, what am I missing?
Thanks for any input
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.
ok, but I also have other DATE fields (not system fields) and those are not coming either
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?
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.
try checking all of these:
I just checked one of my payloads and i have created_date listed under the attributes:
I have them all enabled on mine:
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:
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?
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.
well I know that, I enabled feature access on the feature service with the following options:
I have the fields in the the feature service with values:
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 ,
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.