Select to view content in your preferred language

pulldata updates all relate recs

192
3
Jump to solution
07-29-2024 01:55 PM
BKS
by
Frequent Contributor

Hello

I have a feature service consisting of a FC and a related Table; relationships is FC 1:M Table.

When updating the values in the table all works as expected except... one field used to store the AGOL username ends up calculating this value for all of the records in the table that are related to FC.  When I update other fields it only updates the target record in the table. 

The difference is that I use the following in the calculation column:

pulldata("@property",'username')

I don't understand why it updates all related records?  

Is there a way to prevent this?

Thanks tonnes,

BKS

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

... How are you updating the values?

Editor tracking fields are system (Created by, Created date, edited by, edited date), it'll update with your editor username.

I'd you're using the Survey123 Inbox to edit existing records you might need to adjust the form behaviour:

  • Prevent editing of existing related records (use the repeat parameters to prevent access or updates)
  • Use formulas like Once() or WhenEmpty() to populate the related record with the username only the first time

View solution in original post

0 Kudos
3 Replies
ChristopherCounsell
MVP Regular Contributor

... How are you updating the values?

Editor tracking fields are system (Created by, Created date, edited by, edited date), it'll update with your editor username.

I'd you're using the Survey123 Inbox to edit existing records you might need to adjust the form behaviour:

  • Prevent editing of existing related records (use the repeat parameters to prevent access or updates)
  • Use formulas like Once() or WhenEmpty() to populate the related record with the username only the first time
0 Kudos
BKS
by
Frequent Contributor

Hello @ChristopherCounsell ,

Thanks for the reminder to use Once().  I've used this before but forgot about it.

BTW, the reason I use my own editor tracking fields (as well as the ESRI fields) is that if / when I need to make  a structural or content update to the feature service, it auto updates (by nature) the last editor tracking field.  This removes my history of last editor data so I have to update it with my own last editor field.

Cheers, @BKS

 

0 Kudos
ChristopherCounsell
MVP Regular Contributor
Glad to hear!

I do the same with username. Just wasn't sure if you were doing an edit and
wondering why the edited by field was changing. It's somewhat common for
users to accidentally rely on this field not realising the behaviour.
0 Kudos