view/edit and counting repeats in a form

483
2
Jump to solution
05-09-2023 02:57 PM
clt_cabq
Occasional Contributor III

I have a form that includes a repeat for inspections that follow an initial site visit. A couple of things I am trying to solve that I think i know the answers two but would like to get confirmation:

  • I can count repeats by using the count() function on some item that always gets an answer in the repeat, there's no way to simply get the index of a given repeat. I'm thinking of having this be the inspector's name that is pulled automatically from the device. Is this a correct approach? Will this count and display ALL repeats or only the ones that are being added during the current session, which should only typically be one. This probably isn't significant for the field, but the count of inspections becomes important in post-field reporting.
  • I also think that I either have the ability to load all repeats for a given parent record and those would be editable or allow users to 'add' new records without being able to see previous entries. What I'd really like to do is load all previous inspection records as read-only while allowing users to add new inspections. 
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

You can get the index of a repeat using position(..)

I always make each inspection a form.  Works out way better for editor tracking and all that.  Plus location on each form etc.  Editing past records and adding a repeat tends to not go well.

Have a parent layer that is your inspection sites in Field Maps then launch 123 forms from link passing the key over then it all links up.

Then you can use Arcade for totals and all that in the web map.

Little bit more advanced workflow but it has been a winner.  Hope that helps

View solution in original post

0 Kudos
2 Replies
DougBrowning
MVP Esteemed Contributor

You can get the index of a repeat using position(..)

I always make each inspection a form.  Works out way better for editor tracking and all that.  Plus location on each form etc.  Editing past records and adding a repeat tends to not go well.

Have a parent layer that is your inspection sites in Field Maps then launch 123 forms from link passing the key over then it all links up.

Then you can use Arcade for totals and all that in the web map.

Little bit more advanced workflow but it has been a winner.  Hope that helps

0 Kudos
clt_cabq
Occasional Contributor III

Appreciate your insight, I think this may be the best approach ultimately. Trying to drive everything from the survey may be too complicated..