Select to view content in your preferred language

Pulling Most Recent Survey Submitted for ArcGIS Online Map

380
2
05-15-2023 06:32 PM
GarrettRSmith
Frequent Contributor

Hello

I have a feature layer and related table that are created via Survey123 and updated via Field Maps with links to Survey123. I am trying to crate an ArcGIS Online map that will only display the most recent table record for the pop-ups.

For example, I have one table, Condition, where some of the features may have two to three conditions submitted over the course of the project. I am only interested in the most recently submitted record for the Condition table. 

Hopefully that makes sense, but please let me know if you need any clarification.

0 Kudos
2 Replies
DougBrowning
MVP Esteemed Contributor

You can use Arcade in the pop up for this.  Take a look at the FeatureSet commands.

See here  https://community.esri.com/t5/arcgis-online-questions/how-do-i-pull-the-most-recent-date-with-my-arc... 

0 Kudos
GarrettRSmith
Frequent Contributor

Great,

Thanks for the link, I will look into this.

I also forgot to include the following information that may lead to a different solution.

For the Condition table, which I am trying to show the most recent record I have a question that is Yes or No and this is what I am trying to achieve.

  1. Currently I have an online map where there is a filter applied to the joined hosted view feature layer (join between feature layer and Condition table) that selects all features where the question is answered "yes".
  2. This map, where the answer is "yes" to the particular question is used in Field Maps so that individuals can navigate to the locations in the field.
  3. When someone goes out and addresses the issue signaled by the "yes" answer, collects a new record on the Condition table, and then answers the yes or no question with a "no", I would like that feature to not be present on the online map and also disappear from the Field Maps so people will not visit sites multiple times that have already been addressed.

My assumption is that I need to set up an Arcade expression that would pull the most recent record so that the previous "yes" answer will not show up on the online/Field Maps maps anymore. 

Please let me know if this provides more clarification on what I am trying to do.

0 Kudos