$pixel profile has all null values in arcade expression within pop-up for Tiled Imagery Layer

531
7
Jump to solution
03-04-2026 09:25 AM
Labels (1)
mdesh23
Emerging Contributor

I'm attempting to use the new $pixel profile in a pop-up for a Tiled Imagery Layer in a Web Map. I have a fields list set up and I can see that there are pixel values for the areas in my tiled imagery layer. However, when I attempt to use an arcade expression to access the pixel value, it says there is no value. 

 

Fields List in Pop-up

Screenshot 2026-03-04 122058.png

Arcade Expression: (Console shows default message, no pixel value) 

Screenshot 2026-03-04 122257.png

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

I was using this image service.

Also, when using an Arcade element, you have to return a dictionary

return { 
	type : 'text', 
	text : `Pixel Value: ${Number($pixel["Raster.ItemPixelValue"][0])}`
}

 

View solution in original post

0 Kudos
7 Replies
KenBuja
MVP Esteemed Contributor

This code works in my popup. I get an error in the console when running it, because everything in $pixel is null in the test environment, but it does have values in the popup

2026-03-04_13-17-48.PNG

2026-03-04_13-14-57.PNG

 

0 Kudos
mdesh23
Emerging Contributor

Interesting, I am getting an execution error in the test environment, with nothing showing for Console($pixel). Even I just go ahead and add the arcade expression, nothing shows in the pop-up. Even the text that says "Pixel Value: " does not show, I think because of this execution error.

Screenshot 2026-03-04 132733.png

Screenshot 2026-03-04 133031.png

 

Screenshot 2026-03-04 132836.png

0 Kudos
mdesh23
Emerging Contributor

What imagery layer type are you using @KenBuja, I'm using a tiled imagery layer. I've tried this same thing with another tiled imager layer that I do not own and I'm having the same problem. 

0 Kudos
KenBuja
MVP Esteemed Contributor

I was using this image service.

Also, when using an Arcade element, you have to return a dictionary

return { 
	type : 'text', 
	text : `Pixel Value: ${Number($pixel["Raster.ItemPixelValue"][0])}`
}

 

0 Kudos
mdesh23
Emerging Contributor

That concept did work. This is what I did: 

Console(Text($pixel["Raster.ServicePixelValue"][0]))

var pop_up_text = 'pixel value: ' + Text($pixel["Raster.ServicePixelValue"][0]);

return { 
	type : 'text', 
	text : pop_up_text
}

 
However, in my test environment it still shows an execution error and the Console does not populate with anything which I don't understand. It seems like this maybe be an issue with tiled imagery layers? 

The actual pop up displays this now: 

Screenshot 2026-03-04 141421.png

0 Kudos
KenBuja
MVP Esteemed Contributor

In my experience, the text environment uses the first item, whether its a feature or pixel. I'm guessing the first "pixel" is null but all the others will return a valid response. I would also get the execution error when running it there. However, as shown in the image, I do see what the keys are in the $pixel dictionary.

The reason I was using "Raster.ItemPixelValue" was that it's shaded relief image. The "Raster.ServicePixelValue" key returned an array like ["69","176","45"], representing the red, green, and blue values.

RPGIS
by MVP Regular Contributor
MVP Regular Contributor

As @KenBuja has mentioned,

It isn't atypical for arcade to pull the first record which makes testing difficult. Try Filtering for any other record to see if you get the same result. If not then that points to the fact that the first record simply either exists outside of the image(ry) and cannot get the pixel value or it is something else.