Im creating a feature set using a data expression in a dashboard. Its all pretty straightforward stuff.
I've created a dictionary with just four fields. Two strings, a double and a date field
//there is a heap of stuff before this, but you get the idea. I've created some variables and populated a dictionary with them
var new_features_dictionary = {
'geometryType': '',
'fields': [
{'name': 'tasky', 'type': 'esriFieldTypeString'},
{'name': 'group', 'type': 'esriFieldTypeString'},
{'name': 'hours', 'type': 'esriFieldTypeDouble'},
{'name': 'datedone', 'type': 'esriFieldTypeDate'}
],
'features': new_feature_list
}
return FeatureSet(text(new_features_dictionary))
The string fields and double field work exactly as expected but no matter what i do i cannot get the date field to populate. All i am doing is taking the date field from an existing feature layer and passing it through to the new feature set. There are no calculations, nothing technical at all.
It seem that esriFieldTypeDate just does not work in data expressions. Please someone tell me this isnt the case.
(p.s yes, i even tried a million different way of converting the date to text and back to date again. When i make the date field a esriFieldTypeString, the feature set populates beautifully. However a text date in a dashboard is completely useless. Im totally out of ideas)
Scott