USA NAIP Imagery - Acquisition Date displays as a string, not a date, in Web AppBuilder popup

316
5
Jump to solution
03-24-2025 07:01 PM
AnitaB
by
Occasional Contributor

Hi all!

 I just updated my web map's USA NAIP Imagery: Natural Color layer to filter for 2023, instead of 2021.  When clicking on the map, the default popup displays the following attributes, including Acquisition Date.   

You've selected the Primary image.  

  • State: MA    
  • Acquisition Date: August 23, 2023  
  • Resolution: 0.3 (m)  
  • Quarter Quadrangle Map Name: MANSFIELD SE   
  • Quadrant Key: 4200000710730

If you've selected an Overview image, zoom to your local level area of interest to get information for the Primary image.

However, the Web App using my web map does NOT display the acquisition date as expected.  Instead, I get a numeric string:

You've selected the Primary image.  

  • State: MA    
  • Acquisition Date: 1692835200000.000000  
  • Resolution: 0.3 (m)  
  • Quarter Quadrangle Map Name: MANSFIELD SE   
  • Quadrant Key: 4200000710730

If you've selected an Overview image, zoom to your local level area of interest to get information for the Primary image.

Yet, when I open the web app's attribute table, I do see the proper Acquisition Date.   Here is a screenshot with the popup result and attribute table result:

AnitaB_0-1742866900118.png

The popup text is simple enough:   Acquisition Date: {AcquisitionDate} 

with default formatting:

AnitaB_0-1742869121175.png

The web map is used in a Web AppBuilder application configured with the Launchpad template.  The NAIP layer is set up with the subscriber content access to allow user access to this imagery.  The map/application is not public.

I tried a new map with just the NAIP layer, and a new app.   I get the same results. 

I have held off on converting this application to Experience Builder as I wait for the screening widget/report functionality I need.  Hence, I am hoping I can remedy this to hold off a little while longer...   thank you for any thoughts or insights!

 

 

 

0 Kudos
1 Solution

Accepted Solutions
AnitaB
by
Occasional Contributor

Hi Rob -- so, I finally have something that works! 

The roundabout summary:

  1. FAIL:  As posted initially, I reset my original NAIP layer from YEAR = 2021 to YEAR = 2023.  AcquisitionDate did not display properly in Web App, only in Web Map.
  2. ALMOST:  After trying various things, I just deleted the NAIP layer, saved my map, reloaded my map, and readded NAIP.  Filtered for 2023.  That worked.  I renamed the layer. Popup date failed again.  Renaming the layer back did not help.
  3. HOORAY:  I deleted the NAIP layer. Saved and reloaded my map. I added NAIP fresh again. I filtered for 2023. However, I did NOT rename the layer. I held my breath. It works in my Web App. 

Whew.  Thank you for the support - ab

View solution in original post

5 Replies
AnitaB
by
Occasional Contributor

okay, . 1692835200000.000000 looks to be a timestamp and I can convert it elsewhere to August 25, 2023.  If that is the case, 

1. the date is off when matched against my web map (8/23/2023), thus there is some date math that needs doing by me.

2. But, the NAIP popup doesn't seem to allow for "Arcade expressions". It does not appear under Popup > Options as an option.  And so an attempt to apply a date format myself doesn't appear possible.  The original popup came "as is" with the NAIP layer.

Is there a trick to getting at my desired date display?  and if so, tips for manipulating the timestamp to appear as local time (east coast) would be helpful.

@RWaterman your response to my prior NAIP posting helped me out of a pickle.   Any chance you might have a suggestion for getting a formatted date to appear in my WAB application instead of the timestamp?

0 Kudos
RobertWaterman
Esri Contributor

Hi,

There are two date fields in the table for NAIP. One is a 'date' field type and the other is a string field type. It appears you are pulling in the string field. Can you see if accessing the 'AcquisitionDate' field solves your issue?

Date field type:

date as date.jpg

String field type:

date as string.jpg

Best,

Rob

0 Kudos
AnitaB
by
Occasional Contributor

Hi Rob.   The popup is using the Date field type - AcquisitionDate.  That is the source of my frustration. It displays appropriately in the Web Map, just not in the Web App using this web map.   

web map (acquisitiondate field)

AnitaB_0-1742925325672.png

web app  (acquisitiondate field):

AnitaB_1-1742925393283.png

 

and for contrast, if I were using SrcImgDate, which I wasn't:

web map (SrcImgDate):

AnitaB_2-1742925712995.png

Thx

 

0 Kudos
RobertWaterman
Esri Contributor

Thanks for clarifying.

I performed the following steps but was unable to reproduce the issue.

  1. Created a web map using the USA NAIP Imagery: Natural Color layer from Living Atlas
  2. Created a web mapping application using web app builder.
  3. Selected the Launchpad theme and my web map from step 1
  4. When I click the map, this is what I see in the popup:

RobertWaterman_0-1743007736039.png

RobertWaterman_1-1743008405330.png

 

Can you try my test app and see if you see what I see? Also, let me know if there are additional details I may be missing.

 

0 Kudos
AnitaB
by
Occasional Contributor

Hi Rob -- so, I finally have something that works! 

The roundabout summary:

  1. FAIL:  As posted initially, I reset my original NAIP layer from YEAR = 2021 to YEAR = 2023.  AcquisitionDate did not display properly in Web App, only in Web Map.
  2. ALMOST:  After trying various things, I just deleted the NAIP layer, saved my map, reloaded my map, and readded NAIP.  Filtered for 2023.  That worked.  I renamed the layer. Popup date failed again.  Renaming the layer back did not help.
  3. HOORAY:  I deleted the NAIP layer. Saved and reloaded my map. I added NAIP fresh again. I filtered for 2023. However, I did NOT rename the layer. I held my breath. It works in my Web App. 

Whew.  Thank you for the support - ab