I am trying to add a progress bar to an ArcGIS online map, pretty much like the example from MikeSchoelen.
I have tried configuring the Custom Attribute Display in the maps Configure pop-up but I have been unsuccessful. I would appreciate any info on how to do this. I've been trying to do this in HTML but Arcade would be ok as well.
<h1>The progress element</h1>
<label for="file">Downloading progress:</label>
<progress id="file" max="100" value="32"> 32% </progress>
Solved! Go to Solution.
You can use the Text() function to convert other values to a string. However, it might be easier to just do your evaluation as a number.
IIF($feature.PercentCom == 25, 'background-color:#1987bb', 'background-color:#DDDDDD')
I was able to accomplish this with the following but it only works for "Text" fields. My fields is a Long field.
How can change the Arcade code to accept the long field?
Arcade
IIF($feature.PercentCom == '25', 'background-color:#1987bb', 'background-color:#DDDDDD')
HTML
<span><b><br /><br /><br />Phase</b></span>
<table style=" border-collapse: separate; border-spacing: 6px 4px; width: 100%; table-layout: fixed;">
<tbody><tr height="16">
<td style="{expression/expr0}"></td>
<td style="{expression/expr1}"></td>
<td style="{expression/expr2}"></td>
<td style="{expression/expr3}"></td>
</tr>
<tr height="24" style="text-align: center;">
<td>25%</td>
<td>50%</td>
<td>75%</td>
<td>100%</td>
</tr>
</tbody></table>
You can use the Text() function to convert other values to a string. However, it might be easier to just do your evaluation as a number.
IIF($feature.PercentCom == 25, 'background-color:#1987bb', 'background-color:#DDDDDD')
I used the following. took me a while to figure out that ")" went after the $feature.percentage.
IIF(Text($feature.percentage) == '25', 'background-color:#1987bb', 'background-color:#DDDDDD')