Select to view content in your preferred language

forms, arcade - Can you change editcontext between update and insert

109
1
Monday
DaveSivertsenz
Emerging Contributor

We are using Field Maps in a setting similar to retail inventory. Desired Outcome:100 items in an area each have a unique QRCode printed on it's asset tag. Users scans each, creating or updating the feature for each. If the feature already exists in the feature class, the check date is updated. If it has never been scanned, a new feature is created. 

We have a number of Arcade attribute rules, either client side or server side. In Arcade, we can easily determine if a QRCode is has been entered or not. The blocking issue seems to be that in FieldMaps, you must select Add(Insert) a new feature, or Edit(Update) an existing Feature. Until you scan the QRCode, you don't know if it is an update or an insert. Is it possible to change the editcontext using Arcade? Or is there a way to do this Server side? The use case should allow repeated operation, scanning each tag and hitting submit, without having to respond to an error and change modes each time an item is scanned.

Tags (2)
0 Kudos
1 Reply
ChrisDunn1
Esri Contributor

Hi @DaveSivertsenz ,

I don't think there will be a straightforward way to achieve what you are describing with a single QR code. The limitation being that the intent (i.e the updateFeature or addFeature reference context) would need to be hard-coded into the url that is launched via the QR code. That being said, I think a straightforward way to achieve this would be with two QR codes, and some guidance on which one to scan first.

The user scans the `updateFeature` QR code, if the feature doesn't exist they'll get a warning saying the feature couldn't be found, and then they scan the `addFeature` one instead. If the feature did exist, then they'd be able to update the feature when they scan the first code.

0 Kudos