POST
|
There are a couple ways you could do this. The simplest is to make the embedded form view-only, but add an "edit entry" link / button to the dashboard that opens an editing form in another tab / window. Properly shared, only authorized users will be able to see that form. A more advanced way is to use a Data Expression. You can actually use the function GetUser in your expression to alter the output of the expression based on the user's group membership. In this way, a typical user would literally see a different embed URL with ?mode=view tacked on, whereas your editors would see it with ?mode=edit. It might look something like this: var user = GetUser()
// see if user in designated group, set URL param accordingly
var mode_param = Iif(
Includes(user['groups'], 'editors group'),
'edit',
'view'
)
// get layer
var fs = FeatureSetByPortalItem(
Portal('your portal url'),
'itemid of service',
0, // layer index
['globalid'],
false
)
// build FeatureSet with survey URL fields
return Distinct(
fs,
[
{name: 'globalid', expression: 'globalid'},
{name: 'survey_url', expression: "'https://survey123.arcgis.com/share/surveyitemid'"},
{name: 'mode_param', expression: `'${mode_param}'`}
]
) Then for your embed URL, you can string together {survey_url}?mode={mode_param}&globalId={globalid}.
... View more
a week ago
|
1
|
1
|
188
|
POST
|
The simplest is to use Iif to assign the color based on the field. For something this direct, you don't even need to mess around with variables. Put this in your advanced formatting section: return {
textColor: Iif($datapoint['fail'] == 'Yes', 'red', 'green')
} Feel free to swap the color names with hex codes to get the colors how you want them. Edit: I had my red and green mixed up! Edited the code block.
... View more
a week ago
|
1
|
1
|
102
|
POST
|
An indicator's advanced formatting area doesn't have access to the source data in a way to actually execute this expression. What you'd need instead is to use a Data Expression to create an ad-hoc "layer", and calculate your percentiles there. Is your indicator showing percentiles for a selected feature?
... View more
a week ago
|
0
|
1
|
141
|
POST
|
You're not doing anything wrong, but that kind of filtering across layers isn't usually possible in Dashboards without something like a Data Expression. In order to filter one widget from the other, they either need to share the same data source, or else the grouped field in your chart has to be present on the map. I don't think having thousands of records is necessarily a dealbreaker on this, but you'd have to write the expression carefully to avoid performance issues. I'd recommend taking a look at "memorizing" the featuresets: https://codeberg.org/kendall-county-gis/arcade-expressions/src/branch/main/memorize.md If you can push the entire layer to RAM first, a multi-layer looping expression will be able to execute much faster.
... View more
a week ago
|
0
|
0
|
184
|
POST
|
When you go to set the button link, you can choose a window there:
... View more
2 weeks ago
|
1
|
0
|
123
|
POST
|
The short answer is "no". However, know that altering the configuration of a web map can only be done by: The map's owner An organizational admin Users who belong to a "shared update" group, assuming the map is also shared to that group. Outside of that, you can share web maps with anyone; they won't be able to change your settings.
... View more
3 weeks ago
|
1
|
1
|
201
|
POST
|
To get single lines to be colored differently, you'll need to use inline styling. Since you're doing the same color scaling to each field, this would be a good spot for a custom function: function colorize(x) {
var col = When(
x < 34, 'red',
x < 67, 'yellow',
x < 100, 'green',
'black'
)
return `<span style="color:${col}">${x}</span>`
}
return {
attributes: {
comp1: colorize($datapoint['comp1']),
comp2: colorize($datapoint['comp2']),
comp3: colorize($datapoint['comp3']),
comp4: colorize($datapoint['comp4']),
comp5: colorize($datapoint['comp5'])
}
} Then in your line item template, bring the colorized text in "{expression/comp1}", etc.
... View more
3 weeks ago
|
0
|
1
|
122
|
POST
|
You need to check the values of the fields based on the domain code, not the domain name. I'm assuming the value "In Progress" might be stored as "in_progress" or something like that? You'd need to check if(reviewStatus == 'in_progress') if that's the case. To check against the description itself, you need to use DomainName($feature, 'reviewStatus') to pull the text name.
... View more
3 weeks ago
|
0
|
1
|
154
|
POST
|
Weird, mine is still a dot. Are the features points, or polygons?
... View more
3 weeks ago
|
0
|
1
|
208
|
POST
|
The color is in the dashboard theme settings: The size, I don't think you can control without doing something really hacky, like buffering the point feature in a Data Expression or something.
... View more
3 weeks ago
|
0
|
3
|
210
|
POST
|
"Hosted" is shorthand for "stored in the DataStore", which also means "definitely not in the SDE". The whole point of a hosted layer is to do all the management of schema, access control, etc., through the Portal interface and not bother with administering a database. I'm not sure what a "hosted layer" would even mean if it were just registered to an SDE connection instead.
... View more
3 weeks ago
|
1
|
0
|
104
|
POST
|
Honestly unsure how to get an average from a string field, but this will give you the count of phenomena per unique zone/begin/end combination. var fs = FeatureSetByPortalItem(
Portal('your portal url'),
'itemid of your service',
0, // layer index
['fields', 'you', 'need'],
false
)
return GrouBy(
fs,
[ 'zone', 'season_begin', 'season_end' ],
[
{ name: 'the_count', expression: 'phenomena', statistic: 'count' },
]
)
... View more
3 weeks ago
|
0
|
0
|
95
|
POST
|
In your example, you've got a return at line 50, so it's going to return the featureset before the Distinct ever happens. To get those other fields in, we just need to add them to the Splice. They're simple enough that the SQL expression is very similar to what you already have. return Distinct(
fs,
Splice(
sqlfields,
{name: 'Team_category', expression: teamcat_sql},
{name: 'Holiday_new', expression: "Holiday_new / 60"},
{name: 'Holiday_old', expresion: "Holiday_old / 60"},
{name: 'Holiday_TOT', expression: "(Holiday_old + Holiday_new) / 60"}
)
) I should add: since we're using Distinct, you don't need to create the out_dict object or loop through your features.
... View more
3 weeks ago
|
1
|
1
|
150
|
POST
|
It's interesting, the chart "sees" the other values, but when there's nothing to render for the Pie Chart, it won't include it in the legend. A serial chart will show the empty values, though: I think it's just a default setting on the pie chart, probably nothing you can do about it without something kinda hacky like making an SVG pie chart from scratch.
... View more
3 weeks ago
|
0
|
0
|
127
|
Title | Kudos | Posted |
---|---|---|
1 | Tuesday | |
1 | Tuesday | |
1 | Monday | |
1 | Monday | |
1 | a week ago |
Online Status |
Offline
|
Date Last Visited |
Tuesday
|