Select to view content in your preferred language

Field Maps link error when using referenceContext=showFeature

577
5
Jump to solution
02-10-2026 07:11 PM
fmcintosh
Emerging Contributor

Hi all,

I'm running into an error when using a Field Maps link.

For context I'm using ArcGIS Online in the Asia-Pacific region. I've tested this on both Apple and Android using the latest versions of Field Maps.

Here is an example Arcade expression:

// Get feature GlobalID
var featureGlobalID = Replace(Replace($feature.GlobalID, '{', ''), '}', '')

// Set base url

// Set parameters
var params = {
  referenceContext: 'showFeature',
  featureSourceURL: '<LAYER_URL>',
  featureID: featureGlobalID
}

// Return show feature URL
return url + UrlEncode(params)

Noting I've removed the actual layer URL. I've tried these links in the context of an Integration task action as well as in a popup. I've also tried to use other layers in the field map as well.
 
 

In the troubleshooting logs I can see that it has successfully parsed the app link with the showFeature context and source (source URL) and id (feature GlobalID).

 

However, I consistently get a log immediately after of [APPINTEGRATION]: Layer not found: <LAYER_URL>. The link doesn't do anything as a result.

 

This is weird because for other app links with referenceContext=addFeature or updateFeature or addRelatedFeature these have all worked with the same layer URL. In that code example if I change the referenceContext: 'updateFeature' it works straight away.

 

Any help would be greatly appreciated.

Cheers!

 

0 Kudos
1 Solution

Accepted Solutions
fmcintosh
Emerging Contributor

I got it working @ChrisDunn1!

The issue was the URL...

For other referenceContext I copied it from the feature service page it had the word 'ArcGIS in it. This wasn't working so by chance I tried copying it from the layer page in the item details it had 'arcgis' instead of 'ArcGIS'. This now worked straight away for showFeature.

View solution in original post

5 Replies
ChrisDunn1
Esri Contributor

Hi @fmcintosh,

When you see the error Layer not found: <LAYER_URL>, is the url presented correct? And is it shown as encoded?

You shouldn't need to encode your url or any parameters for this link, so removing the UrlEncode() function may solve the problem. 

It's odd that the different reference contexts are behaving a bit differently, so there may be more to look into, but hopefully that change will at least get things working for you.

Chris

0 Kudos
fmcintosh
Emerging Contributor

Hi @ChrisDunn1,

Yes, in the log the layer URL is correct, and it is not shown as encoded. 

I tried what you suggested not encoding the parameters and I got the same logs.

The previous log in both cases (using my original code and the update) before the URL not found shows me:

[APPINTEGRATION]: Parsed app link:AppLink(auth: nil, browse: nil), operation: Optional(SequoiaCore.AppLinkMapOperation.showFeature)

For this operation it includes the parameters source (the URL which is correctly presented), id (the feature GlobalID) and callback and callbackPrompt both nil.

The thing that is strange is that with the same URL if I just change the showReference: 'updateFeature' in the dictionary (no other changes) it works straight away and takes me to the feature to be updated. And visa versa when I change it back I get layer not found.

 

0 Kudos
fmcintosh
Emerging Contributor

I got it working @ChrisDunn1!

The issue was the URL...

For other referenceContext I copied it from the feature service page it had the word 'ArcGIS in it. This wasn't working so by chance I tried copying it from the layer page in the item details it had 'arcgis' instead of 'ArcGIS'. This now worked straight away for showFeature.

ChrisDunn1
Esri Contributor

I'm glad you got it working @fmcintosh, it was really starting to stump me 🙂

0 Kudos