Feature reports: Can you get utcOffset from attribute?

657
5
03-07-2020 11:14 AM
RobBlash
Regular Contributor

I use pulldata to store the utc offset as an attribute in my surveys. Since we now have the ability to specify an offset in feature reports, the logical progression is to use my attribute to calculate the time offset in my reports. However, I can't seem to get this to work. Any suggestions?

Happy Daylight Savings!

0 Kudos
5 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Rob,

Apologies for the delay.  You would be able to make use of the UTC offset data via the ArcGIS API for Python.  It currently isn't supported in the template syntax itself, but I've noted this as a potential enhancement. You may also want to post this to https://ideas.arcgis.com  

0 Kudos
RobBlash
Regular Contributor

Hi James,

Is there any chance this may be an enhancement we would see before the next time change?

Thanks,

Rob

0 Kudos
RobBlash
Regular Contributor

Hi James Tedrick I'm wondering if there are any updates on this as an enhancement? If there is any possibility of implementing this before DST (November 1st) that would be a huge help to my workflows.

My idea below (thought I created this months ago...)

Survey123 Feature reports: Calculate utcOffset from attribute 

0 Kudos
RobBlash
Regular Contributor

James Tedrick‌ this seems like it should be possible now with variables, can you confirm? I am having trouble getting it working. I have 2 existing fields in my survey:

${remark_date} - date/time question populated by user

${formutcoffset} - calc field in survey which populates the utc offset

However, this syntax in my report is not working:

${#remarks}${remark_date | utcOffset: formutcoffset}

${/remarks}

I should note that ${remark_date} is in a repeat, and ${formutcoffset} is outside of the repeat. I seem to remember that accessing parameters outside of a repeat are not possible, is this true?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Rob,

If the formutcoffset is out of the repeat, you should specify it as <layername>.formutcoffset , where <layername> is the name of the parent layer.

0 Kudos