|
POST
|
If they both have the unique ID in the field BUILDINGKEY, then line 5 should be var destinationRow = first(Filter(fs, "BUILDINGKEY = @ID"));
... View more
10-23-2024
05:32 AM
|
1
|
3
|
3643
|
|
POST
|
Take a look at the Reusing Pro Commands documentation page
... View more
10-22-2024
05:10 AM
|
0
|
0
|
1922
|
|
POST
|
There's a GitHub site that contains many different types of data expressions for Dashboard, including one showing how to combine different dataset. Here's a script that combines two different dataset, each with a Date field. I'm selecting all the dates that aren't null to populate the table. You can expand this to your five data sets. var portal = Portal("your portal");
var fs1 = FeatureSetByPortalItem(
portal,
"itemId for first dataset",
0,
["Date"],
false
);
var fs2 = FeatureSetByPortalItem(
portal,
"itemId for first dataset",
0,
["Date"],
false
);
var features = [];
var feat;
function populateFeatures(fs) {
for (var i in fs) {
if (!IsEmpty(i.Date)) {
feat = { attributes: { Year: Year(i.Date) } };
Push(features, feat);
}
}
}
var featureSets = [fs1, fs2]
for (var fs in featureSets) {
console(featureSets[fs])
populateFeatures(featureSets[fs]);
}
var combinedDict = {
fields: [{ name: "Year", type: "esriFieldTypeInteger" }],
geometryType: "",
features: features
};
return FeatureSet(combinedDict);
... View more
10-18-2024
07:01 AM
|
1
|
0
|
1270
|
|
POST
|
I have a separate account I use for testing how a regular user would see these things.
... View more
10-18-2024
06:18 AM
|
0
|
0
|
2640
|
|
IDEA
|
I have a similar use case. I have a Web AppBuilder app with a custom widget (which is in the process of getting rewritten for Experience Builder) to gather information from a defined group of users. A separate feature layer is created for each user and shared with the user in a unique group for that user. The widget imposes constraints on the editing capabilities of the user, such as limiting the user to making edits on only a certain percentage of the features. If the user edited the feature layer outside the app, they wouldn't be subjected to those constraints. I've had a few cases where a user had enough experience with AGOL and accessed the layer through their account, which created problems with the data they attempted to submit. Making the layer invisible to the user would solve this problem.
... View more
10-17-2024
10:02 AM
|
0
|
0
|
2142
|
|
POST
|
This could be caused by Esri's editing quirk. If you are the owner of the layer, you can edit records even when editing is disabled. This is what shows when I view the data for a layer that should be uneditable. I can still make changes to the Comments field, for example. Have you tried using the app with another account to see if it's still editable?
... View more
10-16-2024
06:20 AM
|
2
|
2
|
2729
|
|
POST
|
There were a couple problems with your code. In lines 13-15, you have the values in an array. You should push the feat into the array inside the for loop (switch lines 18 and 19). The correct field type for strings is esriFieldTypeString in line 24. This should work // get beds data by shelter
var cabq_agol = Portal("https://cabq.maps.arcgis.com/");
var fs_shelters = FeatureSetByPortalItem(cabq_agol, '4ebc62fe425c42ad909b1f30029ded55',['*']);
var sh_feats = [];
var feat;
for (var shelter in fs_shelters) {
var bed_tot = Sum(shelter['female_total'],shelter['male_total'],shelter['couples_total'],shelter['family_total'], shelter['youth_total'], shelter['open_mf_total'])
var bed_occ = Sum(shelter['female_occupied'],shelter['male_occupied'],shelter['couples_occupied'],shelter['family_occupied'], shelter['youth_occupied'], shelter['open_mf_occupied'])
var avail_bed = bed_tot - bed_occ
feat = {
'attributes': {
'sh_name':shelter['name'],
'bed_tot':bed_tot,
'bed_occ':bed_occ,
'avail_bed':avail_bed
}
}
Push(sh_feats, feat)
}
Console(sh_feats)//this returns a correct array of values
// corrected the issue with the brackets i was seeing initially by adding in a closing single quote ( ' ),that was left off after esriFieldTypeInteger
var shelterDict = {
'fields': [{'name':'sh_name','type':'esriFieldTypeString'},
{'name':'bed_tot','type':'esriFieldTypeInteger'},
{'name':'bed_occ','type':'esriFieldTypeInteger'},
{'name':'avail_bed','type':'esriFieldTypeInteger'}],
'geometryType':'',
'features':sh_feats
};
return FeatureSet(shelterDict);
// this gives me a 'Test execution error: Unknown Error. Verify test data.' warning so something isn't getting working
... View more
10-16-2024
06:08 AM
|
1
|
1
|
2156
|
|
POST
|
I substituted another layer and the code would work sometimes, returning content in the Features widget, but it wasn't consistent. Sometimes it would throw the error "popupTemplate is null". Are you getting that in your console? I changed the view.when to featureLayer.when and that seemed be more consistent with a layer that takes a while to load. I also tried using an await function with the FeatureLayerView and that seemed pretty consistent also. view.when(() =>{
(async () => {
const layerView = await view.whenLayerView(featureLayer);
await reactiveUtils.whenOnce(() => !layerView.updating);
const popupTemplate = featureLayer.createPopupTemplate();
popupTemplate.title = 'This is a test';
featureLayer.popupTemplate = popupTemplate;
})()
})
... View more
10-15-2024
07:36 AM
|
0
|
1
|
1898
|
|
POST
|
The map layer that you're providing doesn't have a popupTemplate defined, whereas the web map does. Once you add a template (like in this sample), the Features widget works as expected. const template = {
title: 'This is a test'
}
const featureLayer = new FeatureLayer({
url: "https://gis.cnra.ca.gov/arcgis/rest/services/Boundaries/CCED_AccessType/MapServer/0",
outFields:['*'],
popupTemplate: template
});
... View more
10-11-2024
10:46 AM
|
0
|
0
|
1977
|
|
POST
|
That is based off the title you've set in the popup configuration in the web map. Change this to use the point's name field.
... View more
10-11-2024
09:37 AM
|
1
|
0
|
1044
|
|
POST
|
Can you supply screen shots of the two grouped FeatureSets?
... View more
10-11-2024
06:54 AM
|
0
|
1
|
2675
|
|
POST
|
When adding code to your question, please use the "Insert/edit code sample" button. Reading code in an image (especially as an attachment) is much more difficult. You're setting the container to "tableDiv", which I'm guessing is the div below the map as in this sample. Normally, you could add it into its own container, such as in the Expand sample. However, in my initial testing, this is only adding the table title to the Expand widget, so I'm not sure if this is possible or not. featureTable = new FeatureTable({
view: view, // Required for feature highlight to work
layer: featureLayer,
header: false,
visibleElements: {
menuItems: meuItems
},
tableTemplate: template,
//container: document.getElementById("tableDiv")
container: document.createElement("div")
});
... View more
10-10-2024
07:20 AM
|
0
|
0
|
1967
|
|
POST
|
You can use the FeatureSetByRelationshipName function to get those related records. You can loop through those related records to build your output table for the popup
... View more
10-09-2024
08:16 AM
|
1
|
0
|
976
|
|
POST
|
You were missing a comma and a close parenthesis on lines 4 and 12 FeatureSetByPortalItem(agol,'****************************',15,['*'],false),
... View more
10-08-2024
01:42 PM
|
1
|
4
|
2727
|
|
POST
|
You can't use a Feature in the Count function. You can use Arrays, FeatureSets, or Text strings.
... View more
10-08-2024
08:23 AM
|
0
|
1
|
2560
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM | |
| 1 | 10-11-2023 06:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
8 hours ago
|