I'm hosting a feature on AGOl, and brought it into my Enterprise Portal as a feature service.
In portal, I have a map, utilized by Field Maps, that has the abovementioned feature service in it.
I created a Power Automate flow that sends an email any time a new feature is added. Within that email, I'd like to include a hyperlink that launches the specific map in the Field maps app, and zooms to the location of the newly added feature.
I'm able to create a link that successfully launches the correct map in the Field Maps app, but hit a road block when trying to access a specific feature.
I can get the URL to return the GlobalID; however, can't seem to figure out the featureSourceURL part.
In Portal, the web service rest URL returns this, so I can't obtain the typical rest URL:
If I enter the rest URL from AGOL, I get an error when Field Maps launches advising that layer cannot be found (since the layer isn't being added to the map directly from AGOL.)
Can you share the app link you tried that showed the error in Field Maps?
I've tried a couple...
This one launched field maps, and the appropriate map, but gives an error that the layer could not be found (which makes sense, since the featureSourceURL is looking to AGOL, and the map utilizes the feature service I created in Portal. I was just trying different things with this one):
I tried this one, copying the only link I could out of Portal for the feature service to use in the featureSourceURL, even though it's not a rest URL, and it gave me a server error in '/arcgis' application runtime error in my mobile device's browser:
https://fieldmaps.arcgis.app?referenceContext=updateFeature&itemID=904c5e99277045fc959e9ccccaf9da7a&... https://gucportalprd.guc.com/arcgis/sharing/servers/90784e992e174047bae83fe97540aed2/rest/services/G...
(I noticed the { } weren't surrounding the GlobalID in the two examples above, so I even tried adding those without success.)
I've also tried enabling searching in the map for the layer's ObjectID, by editing the map's json in AGOL assistant, and using the referenceContext=search function in a URL, with no luck (even searching the map manually for an ObjectID after enabling the search didn't work).
The only links I've been able to get to work was one that simply launches Field Maps, one that opens the specific map in Field Maps, and one that uses a referenceContext of search, and includes the feature's "location" attribute in the URL. This works, as long as the individual entering the location uses an address. If they use an intersection or business name, it doesn't work. This is what that link looks like in Power Automate:
<a href="https://fieldmaps.arcgis.app?referenceContext=search&itemID=904c5e99277045fc959e9ccccaf9da7a&search=...']}">Tap Here to launch Field Maps</a>
I had the same issue and had to test A LOT to make this work.
Can you try to place the featureID before the featureSourceURL.
And also if you have a portalURL other than ArcGIS Online, you need to specify this with portalURL
Like this:
https://fieldmaps.arcgis.app/?referenceContext=updateFeature&itemID={itemID}&featureID={featureID}&featureSourceURL=https://services7.arcgis.com/2Z4zSKLqyCcsqQHt/ArcGIS/rest/services/GasProblemRepor...
This URL worked for me, opening the correct FieldMaps Map and the Survey in editMode:
YourExample:
TryThis:
https://fieldmaps.arcgis.app/?referenceContext=updateFeature&itemID=904c5e99277045fc959e9ccccaf9da7a&featureID=E6891CB6-5704-4AD7-A1E0-EA049773F9E0&featureSourceURL=https://services7.arcgis.com/2Z4zSKLqyCcsqQHt/ArcGIS/rest/services/GasProblemRepor...
@LarsChristianØstgaard Thank you. This format worked for me with an iPhone, but not with an Android. Is there a different format or another character in the url for Androids?