POST
|
Yes but the Portal you're trying to connect to might be 10.9.1! I've reached my limit of being able to troubleshoot, I recommend next step is to raise directly with your local Distributor Tech Support team. Referencing this post will help them as well. Carmel
... View more
08-31-2023
12:51 AM
|
1
|
1
|
1861
|
POST
|
Okay, that explains why my suggestion was working for me in ArcGIS Online and not for you in Pro, it doesn't work for me in Pro either! What version of Pro and https://gisportal.localcompany.com/portal are you running? If it's 10.9.1, there appears to be bug associated with GetUser and Attribute rules: https://community.esri.com/t5/attribute-rules-questions/getuser-10-9-1/m-p/1172250 It's fixed in a patch https://support.esri.com/en-us/patches-updates/2022/arcgis-server-10-9-1-utility-network-and-data-managemen-8045
... View more
08-30-2023
09:38 AM
|
0
|
0
|
1868
|
POST
|
Hi Jessica, Can you share the contents/config of your custom attribute display and screenshots to help diagnose? Also including the contents of 'View HTML Source' might be useful: (I've assumed you're using Map Viewer Classic due to your use of the term 'custom attribute display')
... View more
08-29-2023
01:44 AM
|
1
|
0
|
492
|
POST
|
Can you provide the entire script you have where it's erroring on line 4? I ask because it works for me whether I use a real or a fake 'local_portal' URL and if I'm logged in or logged out of it: Perhaps there's something else at play here, is your 'local_portal' URL https://gisportal.localcompany.com/portal accessible publically? What happens if you use https://gisportal.localcompany.com/portal as the 'local_portal' URL in your script instead of (I assume) the real one?
... View more
08-28-2023
01:44 AM
|
0
|
2
|
1883
|
POST
|
Perhaps if (IsEmpty(site id) == false && condition == "open") {
// return symbology when conditions are met
} else {
// return symbology when conditions not met
}
... View more
08-25-2023
04:24 AM
|
1
|
1
|
821
|
POST
|
Try using the DomainName function: https://developers.arcgis.com/arcade/function-reference/feature_functions/#domainname Might be somehting like the following but syntax untested: // Get the feature set for the hydrants
var inspections = FeatureSetByRelationshipName($feature, 'SMS_Inspection_inspection', ['item'], true)
// Get the first hydrant (should only be one)
var inspection = First(inspections)
// If there was a hydrant, return the facilityid of it,
// Otherwise, return null
if (!IsEmpty(inspection)) {
return DomainName(inspection, 'item')
} else {
return null
}
... View more
08-25-2023
04:17 AM
|
1
|
0
|
512
|
POST
|
Potentially something like this might work: if (IsEmpty(local_user) == false && IsEmpty(agol_user) == false) {
// Result returned for local_user and agol_user items
// Continue with script to return usernames
} else {
// Result returned for agol_user only
// Continue script to return agol_user username only
}
... View more
08-25-2023
01:14 AM
|
0
|
4
|
1906
|
POST
|
You're on the right path, Intersection() works when you're working with 2 individual geometries, whereas in your instance it's 1 geometry with a collection (even though your collection is only 1 intersecting geometry) I suggest digging into the resulting intersects result using: var intersectsResult = Intersects($feature, otherLayer);
if (Count(intersectsResult) == 1) {
// Run Intersection and the result will be the intersecting point geometry
var intersectingPoint = Intersection($feature, Geometry(First(intersectsResult )));
} else {
// There's more than 1 intersecting line, do nothing
return null;
} If you do want to work with multiple intersecting lines, using a for loop() will allow you to cycle through the results and work with each intersecting point geometry like line 5.
... View more
08-24-2023
07:58 AM
|
1
|
0
|
1062
|
POST
|
What does the next part of your script do with local_user? Does the script bail out when 'local_user' specifically or afterwards?
... View more
08-24-2023
07:08 AM
|
0
|
0
|
1922
|
POST
|
Hi @Sergio , The main thing I notice is that the Push() function doesn't exist in Enteprise 10.8.1. If you look in the Functions list, it won't be there. Push() was introduced in Dec 2020 and tracing back it first appears in Enterprise 10.9. Instead add to your array using an older method (lines 3, 20, 21 introduced): // Create empty features array and feat object
var features = [];
var featuresIndex = 0;
var feat;
// Populate Feature Array
for (var t in tablefs) {
var tableID = t["FeatureID"]
for (var p in Filter(polyfs, "HydroID = "+tableID)){
feat = {
attributes: {
FeatureID: tableID,
Name: p["DPS_Region"],
ModelID: t["ModelID"],
AddressCount: t["AddressCount"],
MAX_TSTime: t["MAX_TSTime"],
}
}
features[featureIndex] = feat;
featureIndex++
}
} It's a little difficult without seeing your data, but for displaying one to many, I think the code needs to look like: var keyField = $feature.keyField;
var polyfs = FeatureSetByName($map,"FC_polyfs");
var tablefs = Filter(FeatureSetByName($map,"T_tablefs - T_tablefs"), "keyField = " + keyField);
// Create empty features array and feat object
var features = [];
var featuresIndex = 0;
var feat;
// Populate Feature Array
for (var t in tablefs) {
var tableID = t["FeatureID"]
feat = {
attributes: {
FeatureID: tableID,
Name: $feature["DPS_Region"],
ModelID: t["ModelID"],
AddressCount: t["AddressCount"],
MAX_TSTime: t["MAX_TSTime"],
}
}
features[featuresIndex] = feat;
featuresIndex++
}
}
var joinedDict = {
fields: [
{ name: "FeatureID", type: "esriFieldTypeString" },
{ name: "Name", type: "esriFieldTypeString" },
{ name: "ModelID", type: "esriFieldTypeInteger" },
{ name: "AddressCount", type: "esriFieldTypeInteger" },
{ name: "MAX_TSTime", type: "esriFieldTypeString" },
],
'geometryType': '',
'features':features
};
// Return dictionary cast as a feature set
return FeatureSet(Text(joinedDict)); So instead of looking through every table row, you're looping through every table row that has the polygon's matching 'keyField' (swap this for your matching field name).
... View more
06-07-2023
01:44 AM
|
0
|
0
|
482
|
POST
|
Hi @Sergio , What version of ArcGIS Enteprise are you using? This is to check that Arcade functions are available at this version. What field data type is 'HydroID'? If it's string field, you'll need quotes in the SQL query: Filter(polyfs, "HydroID = '"+tableID+"'") At what stage of your script is it failing? Use the console() function, Test, and Messages tab to see how far the script runs to. Something like: var portal = Portal("https://www.arcgis.com/");
console("Runs to portal")
var polyfs = FeatureSetByPortalItem(
portal,
"4dbbad3d6f694e0ebc7c3b4132ea34df",
0,
["*"],
false
);
console("Runs to polyfs")
// Create empty feat variable
var feat;
console("Runs to feat")
// Populate Feature Array
var tableID = $feature["FeatureID"];
console("Runs to tableID") This will help narrow down where the issue lies.
... View more
06-06-2023
07:52 AM
|
0
|
2
|
2923
|
POST
|
Awesome! I'm from one of the border counties so am invested in your success 😋
... View more
03-29-2023
09:12 AM
|
1
|
0
|
1414
|
POST
|
You could try using the Vector Tile Style Editor https://www.arcgis.com/apps/vtseditor/en/#/styles to edit the style of the basemap and make the Country border look like the County border Help: https://vtse.arcgis.com/documentation/
... View more
03-29-2023
09:02 AM
|
0
|
0
|
1419
|
POST
|
Can you share the code you're using in the Calculate? What do you mean by 'but i do not have at this moment the accessible to do it . '? Is the layer shared with you?
... View more
01-05-2023
01:12 AM
|
0
|
0
|
3201
|
POST
|
Oh interesting, I see that embedding web apps doesn't working using the + option, but have you tried the Add > Embed option? I was able to embed a web app as background app, that was interactive with the navigation boundary.
... View more
01-04-2023
03:16 AM
|
0
|
0
|
2074
|
Title | Kudos | Posted |
---|---|---|
1 | 08-24-2023 07:58 AM | |
1 | 08-31-2023 12:51 AM | |
1 | 08-25-2023 04:17 AM | |
1 | 08-29-2023 01:44 AM | |
1 | 08-25-2023 04:24 AM |
Online Status |
Offline
|
Date Last Visited |
03-06-2025
02:52 PM
|