|
POST
|
I had this problem with my data and solved it by changing the properties for the required fields so that they do not have the "Allow NULL" option checked (highlighted in yellow). Note that you can only change that property on an empty table. required.png
... View more
11-13-2023
01:54 PM
|
0
|
1
|
6070
|
|
POST
|
You can use the Schema function to return the list of fields in the related table var relatedInspections = FeatureSetByRelationshipName($feature, relationshipName);
var theSchema = Schema(relatedInspections);
var theFields = theSchema['fields'];
var theFieldList = [];
for (var index in theFields) Push(theFieldList, theFields[index].name)
... View more
11-13-2023
06:41 AM
|
1
|
1
|
4045
|
|
POST
|
That's a template literal. It allows you to embed expressions. `${name}: ${email}` //with template literals
name + ': ' + email //using regular quotes
... View more
11-08-2023
01:09 PM
|
1
|
1
|
1591
|
|
POST
|
I had made a subsequent edit to my script after posting which takes care of the empty name. In your case, you can just use var name = IIf(IsEmpty($feature.full_name), 'Anonymous', $feature.full_name);
... View more
11-08-2023
01:02 PM
|
0
|
3
|
1599
|
|
POST
|
Here's one way to do it: var name;// = 'Jane Doe';
var phone;// = '999-999-9999'
var email;// = '[email protected]';
if (IsEmpty(name)) name = 'Anonymous';
if (IsEmpty(phone)){
iif(IsEmpty(email), `${name}, no contact information provided`, `${name}: ${email}`)
} else {
iif(IsEmpty(email), `${name}: ${phone}`, `${name}: ${phone}, ${email}`)
}
... View more
11-08-2023
12:52 PM
|
0
|
5
|
1607
|
|
POST
|
I added the table to the map just to examine its contents to see what I could add to the popup. In the Arcade script, I make the connection to the related table with the FeatureSetByRelationshipName function.
... View more
11-06-2023
12:56 PM
|
1
|
2
|
2820
|
|
POST
|
You can add a related table to your map, using the Add button in the upper left and using the URL of your table layer.
... View more
11-06-2023
12:21 PM
|
1
|
1
|
3821
|
|
POST
|
This is an older server, running on 10.91. From what others in the thread have said, that capability isn't available yet on Enterprise servers until 11.2 is released.
... View more
11-06-2023
12:10 PM
|
1
|
1
|
1262
|
|
POST
|
Have you tried the one I mentioned above? There are other layers in that service with related records: https://maps2.dcgis.dc.gov/dcgis/rest/services/DCGIS_DATA/Property_and_Land_WebMercator/MapServer/44 https://maps2.dcgis.dc.gov/dcgis/rest/services/DCGIS_DATA/Property_and_Land_WebMercator/MapServer/50 https://maps2.dcgis.dc.gov/dcgis/rest/services/DCGIS_DATA/Property_and_Land_WebMercator/MapServer/49
... View more
11-06-2023
11:47 AM
|
1
|
0
|
1270
|
|
POST
|
It's much easier to work with your code when you use the "Insert/edit code sample" button. Click the three dots at the end of the icon bar, then select the </> icon. I'm guessing you're showing three different versions of the same script you'd like to run, but if I'm incorrect, please let me know. What are the some of the dates you'd expect to see in your data? You can test your script in the Playground like this to see how it works with a variety of dates. var clean_up_date = null;
var contact_date = Date(2023,10,6);
var reporting_date = Date(2023,10,4)
var citation_date = Date(2023,10,5);
When (!IsEmpty(clean_up_date), "Removed",
!IsEmpty(reporting_date) && DateDiff(contact_date, Date (reporting_date), 'days') >=3, "Over Due- Warning three days over Reporting",
!IsEmpty(reporting_date) && DateDiff(contact_date, Date (reporting_date), 'days') <=2, "Contact Made 1",
DateDiff(citation_date, Date(contact_date), 'days') >=3, "Over Due- Citation three days over Warning",
DateDiff(citation_date, Date(contact_date),'days') <=2, "Contact Made 2",
"Open")
... View more
11-06-2023
09:43 AM
|
1
|
1
|
2854
|
|
POST
|
It's probably not an issue with the for loop. Usually when you use a variable in retrieving feature attributes, you have to use the Expects function at the top of the script. This ensures that those attributes are getting requested properly. Expect($feature, 'Dorian_2019','Sally_2020','Ian_2022','Nicole_2022','Idalia_2023');
var fieldList = ['Dorian_2019','Sally_2020','Ian_2022','Nicole_2022','Idalia_2023']
var total = 0
for (var f in fieldList) {
If ($feature[fieldList[f]] == 'YES') {
total += 1
}
}
return total
... View more
11-06-2023
08:42 AM
|
4
|
1
|
5599
|
|
POST
|
As you loop through zdInter, you're appending a new link to zoneLink but you're overwriting the variable z. Give this a try, which reverses that logic (although I haven't been able to test it) var zoningLayer = FeatureSetById($map, "17937d72f47-layer-18",['PID','ZONING']);
var zdInter = Filter(zoningLayer, 'PID=@parcelPID');
var z
if (IsEmpty(zdInter)!=null){
for (var zoningPIDs in zdInter)
{
// Set links
var zl = decode(zoningPIDs.ZONING,"RURAL","<rural link URL>","R1-44","<r1-44 link URL>",'etc')
// Final zoning description
var zd = decode(zoningPIDs.ZONING,"RURAL","Rural","R1-44","R1-44: One Family- 44,000 sf. min.","etc")
var zoneList = `<p style="font-size:16px;">${zd}</p>`+'\n'
z += `<a href="${z1}" target="_blank"><span style="font-size:16px;">${zoneList}</span></a>`
}
}
... View more
11-03-2023
01:57 PM
|
0
|
0
|
1647
|
|
POST
|
They were collected in the summer. I was wondering if you saw the same thing when running your script with your data.
... View more
11-03-2023
12:46 PM
|
0
|
1
|
2248
|
|
POST
|
I was wondering if time zone had something to do with it, but the points were collected in the Eastern time zone and I'm viewing them in the Eastern time zone. The UTC differential should be five hours.
... View more
11-03-2023
12:03 PM
|
0
|
3
|
2253
|
|
POST
|
@jcarlson I was examining a way of using the SQL Extract in a Filter statement, but was running into an issue where the EXTRACT(HOUR FROM field) was returning values that were 4 hours off. Did you see that at all? return Filter(fs, "EXTRACT(HOUR FROM created_date) BETWEEN 8 and 17") extract.png
... View more
11-03-2023
10:42 AM
|
0
|
5
|
2258
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 2 weeks ago | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|