Say I have a feature service named "trees" (hosted feature service in AGOL). Within it I have a feature layer (point) called "tree_assets" and a related table called "inspections". Each time an inspection is created or edited, I want to update the tree_assets feature layer attribute "latestInspection" with the edit date of the latest inspection record. This way, I can symbolise the parent layer (tree_assets) to have green dots (inspected in the last week) and red dots (inspected prior to 1 week ago) on the map.
I want this to be dynamic i.e. something that happens automatically. Not a python script, not an FME script, not a MAKE scenario. This functionality is synonymous with a database trigger but I don't see this functionality available in a hosted feature service). It has to work offline too.
Any suggestions would be great.
Solved! Go to Solution.
Hi,
I tried following your steps for "Option 4" which is the exact workflow I need, but I ran into an issue where it is working for me as owner of the data, but when I share the survey to another user they get an error where they were unable to submit the survey. I am unsure if I missed something from your instructions or maybe I forgot to change a particular setting, but I can't figure out why it works for me, but not my other user.
For reference, the exact setup I have is as follows:
- Existing point layer with last update field for symbolization
- Related 1:M table for recurring task with also has a date field.
- Created view layer with parent point layer & related table, set to editing updates only and sync enabled.
- Created survey in 123connect from view layer. Enabled Inbox. Allow inbox surveys to be edited. Disable sent folder.
- In the XLSform I hid all the fields in the parent layer except for the "Last updated" date field I want to use for symbolization in maps. Set repeat count to 1. Set the date field in the repeat to pull from the parent layer "last updated" field (I tried this the other way, but it wouldn't pull from the repeat up to the parent field when I tested it).
- Created dynamic link in Field Maps pop-up to load the survey from the GlobalID of the selected point per this guide: https://community.esri.com/t5/arcgis-survey123-questions/use-a-url-to-open-existing-record-to-edit-i...
When I published and tested, I am able to load the survey from the URL parameters in the pop-up, it successfully updates the parent layer fields and also allows me to submit a new related record (without being able to see or edit the existing related records). I don't know why it's not working for another user.
Any insight is greatly appreciated!
Thanks,
Zach
it is possible automatically updated field values from parent table to relate table give me some ideas sir . if i updated an attribute value in one field its automatically updated in the relate table parent table and relate table having common field
For offline use, since the underlying mobile geodatabases are SQLite databases, this functionality is inherently "available." That said, how this would be implemented would be opening a giant can of worms for the developers. Somehow being able to add database triggers to the mobile geodatabases would be an answer. We mostly function offline, so I have not investigated what is "under the hood" for online maps in use - but if it is different, then the rules/triggers would also need to be applied at the service level when an add to a related table is submitted - and updates would also need to fire the correct trigger. Regardless, the interface to add these triggers would have to be at the service level.
Currently, we allow our users to update the parent feature and then create the related table records overnight using the Python API. This gives the user the visual effect they are looking for, and the historical information is created overnight. The biggest limitation here is that you are limited to one update between script runs and you need to track how to find these updates via date fields or through other calculated fields in the form(s.) Users editing multiple features, since this does not enforce the forms or calculated values, is another obstacle if they are allowed to edit multiple features.
Another option using dynamic joins, which I have yet to test, was also passed along to me:
I hope this helps. (Sorry if you saw this twice - I wanted to add it under a different account.)
I've created an Idea on the Ideas forum so if this is something you think will be handy then head over and give it a kudos. And also comment if you think it should be refined or updated. Feedback and discussion welcome @ChristopherCounsell, @JoshuaSharp-Heward, @MitchellGrafstein. Its my first contribution to the ideas forum so hopefully I haven't butchered it 🙂
For Ideas, I would encourage:
I'm trying to achieve something similar, i.e. update a parent FC with data from a related record. I found this Github page for attribute rules and got really excited that I could set this up in my enterprise database, but I have not had any luck recreating it in my FGDB environment. Funny things is, the repository also provides a FGDB demo where this script is configured, and it works. When I try and set up a my own feature class and relate table to do the same it just doesn't work. Been so frustrating.
Can anyone tell me if this is still relevant (was 5 years old)?