I have a geodatabase with a pump station layer and an inspection table related to the pump station layer with a one to many relationship. I created a survey using the related table so new surveys simply add to the related inspection table.
I have a map with my pump station layer and related tables. I created a custom URL in the popup to launch Survey123 to perform an inspection on the selected pump station. The Custom URL passes the pump station ID to Survey123, then the user fills out the rest of the inspection. One of the inspection questions requires the user to write in the current water level. The user has to monitor the change in water level, Which mean the user needs to be able to reference the water recorded in the previous inspection for that pump station.
I'd like to add that information to my custom url so the most recently recorded water level for a pump station is simply passed to a field specific in the Survey. The user than can see the previous water level, enter the current water level, and the next survey question automatically calculate the change in water level.
I planned to create a custom arcade expression to reference the most recent water level for each pump station, but I'm unsure how to write the expression, and need some guidance. I've done a lot of research and testing and I'm worried this just isn't possible.
@XanderBakker Added your name since you seem to be the Arcade Scripting King 🙂