Is it possible to us an Arcade expression to calculate attributes for an ArcGIS online feature services?
Use case: Field workers in my department use Quick Capture during a road patrol shift to indicate deficiencies in the field. The Deficiencies feature service powers multiple Workforce projects including one for potholes. I run a model to add new potholes to the Workforce Assignments feature service every morning. I would like to use a calculate expression to determine the DueDate (i.e. date that the pothole needs to be filled by). My calculate expression locates the nearest road feature (which has a Road Classification attribute) and then uses minimum maintenance standards to determine when the pothole needs to be filled by (i.e. Road Class 1 = within 5 days). I've tested my arcade expression on copies of the datasets in a geodatabase on my computer and it works as expected. Can I reference the ArcGIS Online Road feature service in my expression? Both of the feature services (potholes & roads) are hosted on ArcGIS Online. I add them to an ArcGIS Pro project and plug the expression into the Calculate Field tool. The following expressions both throw me an Object not found error. How do I reference the Roads feature service?
var Road = FeatureSetByName($datastore, 'Road');
var Road = FeatureSetByName($Map, 'Road');