Select to view content in your preferred language

Possibility in Field Maps to show the newest value in pop-up from a related table

804
4
04-25-2023 05:06 AM
Status: Open
Labels (1)
JolanHarbrecht
Emerging Contributor

It was possible in the Collector App to show the newest value from a related table in a pop-up. Unfortunately it is not possible in Field Maps anymore. It means that people in the Field need to scroll all the way down to find the newest value. Working in the Field with cold fingers and scrolling doesn't work well. I hope this can be repaired. 

4 Comments
David_Tipping

Hi - It is possible to do this by creating a view of your related table and setting it to just show the most recent record. This is described very well by Eric Wagner in the following YouTube video. See about 6:40 mins into the video: https://www.youtube.com/watch?v=gqC-EEw3nxY 

I don't know if it is possible to do this directly in FieldMaps however the result will show in your map when viewed in FieldMaps

David 🙂 

ChrisDunn1

Hi  @JolanHarbrecht ,

You can access related records from a feature using Arcade and add values from a field to the feature's popup. The following Arcade should get you started:

//call related table named Inspections
var related = FeatureSetByRelationshipName($feature, "Inspections")

//order by DateField
var ordered_related = OrderBy(related, "DateField DESC")

//get the first feautre from the ordered feature set
var latest_inspection = First(ordered_related)

//get the value from the field of interest
var value = latest_inspection.valueField

return value

 

I hope this helps.

Chris 

JolanHarbrecht
Hi Chris,



I'm trying to work out your method but don't seem to succeed. I'm stil working on it. Thanks anyway for the idea. I learn a lot about it.



Bye for now,



Jolan Harbrecht

j.harbrecht@wsrl.nl


JolanHarbrecht
Dear Chris,



I do have problems because to make a join (multiple ofcourse) with analysis gives too many records. So I'm now first going to have my weekend.



By for now.



Jolan Harbrecht