Display Attribute Expressions in Operations Dashboard

4384
7
Jump to solution
06-06-2018 05:46 PM
by Anonymous User
Not applicable

is it possible to display 'Attribute Expressions' you've created in a webMap in operations dashboard (lists, charts, indicators, etc)?

Alternatively, is it possible to create 'Attribute Expressions' within operations dashboard?

Also, could someone please share the code for "Inject color from field value, Create tag effect, Float text right" @16:50?


Thanks so much,

Gee

1 Solution

Accepted Solutions
DavidNyenhuis1
Esri Contributor

Hi Geethaka Fernando‌,

Thanks for the question. At this time, Arcade expressions have limited support in Operation Views (e.g., Arcade expression attributes display in the content of pop-ups and Details elements). It is in our backlog as a consideration to enhance the support of Arcade expressions to more visual elements. 

Regarding the code from that video click, the following dashboard uses the tag technique you are referencing. In the menu in the top right you can create a copy of the dashboard. Configure the List element, go to the List tab, edit the List Item Text, and click <> Source to see the code and preview.
http://www.arcgis.com/apps/opsdashboard/index.html#/37d0e7637f98479e83f5cdcf51038c3e

I'll paste it here too.

<div>
    <p><span style="background-color:{advisory_color}; border-radius:3px; color:#242424; float:right; font-size:11px; padding:1px 4px 1px 4px">{advisory_text}</span></p>
    <div style="float:left">
        <p><span style="font-size:14px">{WATERBODYNAME}</span></p>
        <p><span style="color:#b8553b">{ADVISORYDESC}</span></p>
    </div>
</div>

At this time, Arcade expressions are not supported in the List element. You would have to reference an actual field with the hex color code.

Hope this helps!

View solution in original post

7 Replies
DavidNyenhuis1
Esri Contributor

Hi Geethaka Fernando‌,

Thanks for the question. At this time, Arcade expressions have limited support in Operation Views (e.g., Arcade expression attributes display in the content of pop-ups and Details elements). It is in our backlog as a consideration to enhance the support of Arcade expressions to more visual elements. 

Regarding the code from that video click, the following dashboard uses the tag technique you are referencing. In the menu in the top right you can create a copy of the dashboard. Configure the List element, go to the List tab, edit the List Item Text, and click <> Source to see the code and preview.
http://www.arcgis.com/apps/opsdashboard/index.html#/37d0e7637f98479e83f5cdcf51038c3e

I'll paste it here too.

<div>
    <p><span style="background-color:{advisory_color}; border-radius:3px; color:#242424; float:right; font-size:11px; padding:1px 4px 1px 4px">{advisory_text}</span></p>
    <div style="float:left">
        <p><span style="font-size:14px">{WATERBODYNAME}</span></p>
        <p><span style="color:#b8553b">{ADVISORYDESC}</span></p>
    </div>
</div>

At this time, Arcade expressions are not supported in the List element. You would have to reference an actual field with the hex color code.

Hope this helps!

by Anonymous User
Not applicable

Thanks David Nyenhuis for the explanation and sharing the code.

And it would be greatly appreciated if you could look into including 'Arcade expressions' in the future.

But, love all the new features in 'Operations Dashboard.'

Thanks,

Gee

MikePordes1
New Contributor III

Was there a recent update in Operations Dashboard that made this possible?

NataliyaLys
Occasional Contributor II

This is great work around for the conditional formatting in the Ops Dashboard. Very helpful.

0 Kudos
JasonCyphers
Occasional Contributor III

Where would one set the {advisory_color} values?  I'm assuming this would be an attribute field of the feature layer?

How could I set it so when I enter a status (active, assigned, resolved) the "status_color" field would automatically be updated with the appropriate html color code (red, orange, green)?

0 Kudos
LindsayMaier
New Contributor III

I can get this to work fine in ArcGIS Online, but on an identical dashboard on our Enterprise Portal, it just ignores it and removes the tag. Any idea if this is a known bug in Enterprise?

0 Kudos
MatthewRingel__myesri_
New Contributor II

I would also like to see support for attribute expressions in Operations Dashboard.