Date handling change when published from ArcGIS Pro
After switching from ArcMap to ArcGIS Pro, I've noticed that services published to Portal using ArcGIS Pro seem to handle dates differently. In all our workflows (using Workflow Designer 4.11), we have had to add CDate before all date variables that write to a database. Otherwise the workflow throws an error.
What I'm having trouble with now is the date variable in a datalink. The datalink adds the most recent photos to a report for an area feature. This is what it looks like:
SELECT FileName, OBJECTID, ProjectName, FileLink, InspectorName, FeatureObjectID, InspDate, COMMENTS FROM MtPleasant.dbo.SITEINSPECTIONAREAPHOTOS WHERE FeatureObjectID = @FeatureObjectID And InspDate = @InspDate
This works with the service that was published using ArcMap. It does not work with the service published using ArcGIS Pro. If I remove “And InspDate = @InspDate”, it works, but adds all photos for the feature, not just the most recent.
Any assistance would be great. Thank you.
-
Of course, after posting my question I come across the answer I've been looking for on and off for days.
The date portion of the select now looks like this:
And convert(date,InspDate) = @InspDate
The report now gets the most recent uploaded photos.
I'd be happy to still get any feedback, especially if there's a better way to do this.
0
Please sign in to leave a comment.
Comments
1 comment