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.
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.
Thanks for your response. To clarify my description - there are 100 assets in an area, each with a QRCode. The FieldMaps user has no a priori knowledge of which have been previously scanned. I am looking for a process where when a QRCode is scanned, if it is an existing feature, it will have CheckDate and Location attributes updated. If it has not been scanned previously, a feature is created, with CheckDate and Location. We can do this with Arcade rules, but it is clunky, as you have to choose Update or Create as the default, and throw an error in the other case which requires several actions from the user, rather than efficiently doing 100 scans. A second separate QR code for each item would require that the user knows whether an item has previously been scanned, and chooses the Update or Create code accordingly. The knowledge about whether an item has been scanned is in the database, not in the user's head. I am looking for a way to change the editcontext type from update to insert or viceversa, preferably on the client side, based on whether the QRCode exists in the FeatureClass. I suspect this is not possible, and I should file this as suggestion for future development.
Thanks!