Functions in Dashboard Expressions

431
2
Jump to solution
03-28-2023 05:08 AM
Labels (1)
ARose615
New Contributor II

I am creating a dashboard expression to help visualize some operational metrics for my organization in our Portal.  This expression will eventually be a list element.

I am able to reference the data I need, but as soon as I use either the GroupBy or Filter functions (both of which, I will need to run), I get an execution error with the message "Error". 

 

var agLands = FeatureSetByPortalItem(Portal(port),
    agLID,
    0,
        ['irrig',
        'acres2021',
        'doc_name'],
    False)
var irrigr = Filter(agLands,"irrig = 'Y'");
        

 

I previously defined the portal ( var port), as well as the itemID for the agLands variable (agLID). 

I am able to run the script when defining the irrigr variable without the filter function, but as soon as the filter function, I receive the Execution Error:Error message.  If it matters, we are using Enterprise 10.9.1. I've talked to the Enterprise Administrator, and he doesn't see any errors resulting from this script.

Any help would be appreciated.

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Try running the script with your browser's developer tools open and watch the network tab.

jcarlson_0-1680011632781.png

The response to the query will often have more information in the event that the expression is not successful.

jcarlson_1-1680011666636.png

Do you get anything useful from that?

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

Try running the script with your browser's developer tools open and watch the network tab.

jcarlson_0-1680011632781.png

The response to the query will often have more information in the event that the expression is not successful.

jcarlson_1-1680011666636.png

Do you get anything useful from that?

- Josh Carlson
Kendall County GIS
0 Kudos
ARose615
New Contributor II

This helped greatly!  Looks like there is some networking shenanigans that I can trace down now. Thank you!

0 Kudos