Is it possible to format text in an operations dashboard's list, via html, based on an attribute value? I know it can be done in webdesign through php or css files, but am not sure how limited it is in this environment.
I have a list of feature attributes, and one of those attributes is "status". Is it possible to use some sort of conditional formatting to change the text's color based on the status attribute, something like if {status} = "In Design", make the font color pink; if {status} = "In Progress", make the font color green; if {status} = "Complete", make the font color red... so it'd look like this:
Project Name: XYZ Subdivision
Description: Install underground utilities
Project Status: Complete
Project Name: ABC Subdivision
Description: Install underground utilities
Project Status: In Design
Project Name: 123 Main St.
Description: Install underground service
Project Status: In Progress
I've seen ways to do it with an additional attribute field of an html color code that then colors the cell in the list with that color, but I also seem to remember reading that auto-updates don't work; so if I were to come back and change the status of a feature I'd also have to change the html color manually...it wouldn't do it automatically.
Hopefully all that makes sense...
Hi Jason,
> Is it possible to format text in an operations dashboard's list, via html, based on an attribute value?
Yes, this is possible. Please take a look at these videos:
Hope this helps,
Thanks Derek Law. The 2019 video seems to contain the solution I'm looking for. I'm just not sure how to join the csv file with the feature layer, as described at the 20:36 minute mark of the video. Also, with a join, is that a one time action? If a feature is modified or new features are added, will another join need to be performed?
Hi Jason,
Sorry for the late reply. I was working at the esri Federal GIS conference in Washington, DC last week.
> I'm just not sure how to join the csv file with the feature layer, as described at the 20:36 minute mark of the video
I'm not sure either, but will check with the presenter. More to follow.
> Also, with a join, is that a one time action? If a feature is modified or new features are added, will another join need to be performed?
I am 95% sure that answer is "yes" to both your questions - although I have not personally tested.
Hope this helps,
Hi Jason,
You can join your layer and your table to create a dynamically updating feature layer view layer. In this way, as each of the sources update, the view layer updates.
You can perform the join using the Analysis tool in the Map Viewer. Follow the steps outlined in this doc, making sure to check the box at the end to create a feature layer view.
Create results as hosted feature layer view allows the data to stay up-to-date as the source data changes. Hosted feature layer views containing joins will be read-only and do not consume credits for analysis and storage. Creating results as a hosted feature layer view is only available for attribute joins. If statistics are included as part of the output, the hosted feature layer view will contain an extra table layer in the view with the statistics. Additionally when storing results as a hosted feature layer view Use current map extent is unavailable.
This layer is the feature layer view in the video. As can be seen in the item details, it is a result of joining two other layers.
I think you were able to figure out how to reference it in the HTML/CSS. Just don't forget the "#" if you are using hex colors.
<p style="color:{my_color_field}">My Text</p>
As for doing it via a related table, it might work in the pop-up but it is not supported in the List element at this time.
In the future, we will be providing a way for you to do conditional formatting right in the List via an Arcade expression.
All the best
Nice...wasn't aware of the 'create results as hosted feature layer' option; however, I don't see that checkbox in the create layer dialog. Only checkbox I see is for the 'use current map extent'. Is this option only available to certain permission levels? (I'm a Publisher in my company's Portal, and the data I'm working with is data I own).
I am able to add a related table with html color codes, and can format text color in the map pop up. Any way to replicate this in a dashboard list?
I can put the same html code into the list source, but don't get the formatting:
Hi Jason,
> I am able to add a related table with html color codes, and can format text color in the map pop up. Any way to replicate this in a dashboard list?
I'm not sure if related table content is supported by the List element. Let me check.
EDIT: Please see Dave's response in this thread.
Hope this helps,
Any luck with this? I'm wondering about the same thing.
Nothing yet. There seems to be an option to create a join between a related table and a feature, and make that a hosted layer so it updates anytime the table or feature is; however, I'm not sure if it's a version or permissions issue, as I don't have that check box option when creating a join. I'm on Portal 10.6 and am a Publisher.