How to pass attributes from selected feature into form in Field Maps?

845
3
04-22-2021 12:02 PM
Oilrig
by
New Contributor

I am new to Field Maps and am trying to figure out what seems to be a simple issue. I would like to use the form to create a new entry, but have that entry be pre-populated with attributes of the feature that was selected.  Here is an example of desired workflow: I have a number of wells in my map. I have also created an editable feature that will house the water levels and date collected for each of the wells in my site along with an accompanying Field Maps form. I would like to be able to click on a well and enter a new water level form entry that has the Well-ID already populated based on the well being clicked.

Is this possible, and if so, how?

Currently I have everything working except I have to manually add the well name to the form. I do not want to "edit" an existing layer since I want to track the changes of water levels over time and have more than just the most recent value per well available. I also do not want to copy a previous entry and and paste a new value because it is ripe for making mistakes (i.e. certain fields may not be properly updated and old data would be inadvertently carried forward).

0 Kudos
3 Replies
GarethBaker1
Occasional Contributor II

Have you created and published a relationship between your wells layer and the table that you want to record water levels in? I think if that is published as part of your service then you should just be able to click on your well and have a related record created in the levels table automatically.

Oilrig
by
New Contributor
Thanks for the suggestion. I have not created or published a relationship between the wells and the water level layer yet (I will need to do some sleuthing on how to do that). However, I tried seeding the water level layer with a dummy record for each well so that the layer already had well info embedded. This "seems" like it would be similar to the relationship approach you mention except it is directly related versus related to an additional layer. Unfortunately, that did not seem to work either (I snap to an existing water level well that had dummy data and click on it to add a new record, but the form does not populate with the well id).
0 Kudos
DougBrowning
MVP Notable Contributor

@GarethBaker1  is right on.  Create a relationship class between them and the id will autopopulate and they will be related.

Then if you want to get fancy you can use Arcade in the parent feature to do a lookup to the children to display the latest level for example using the FeatureSet functions.

Hope that helps

0 Kudos