|
POST
|
Hi, I have a Data Expression that I am using in my Dashboard to help me create a graph that shows average use by day of week for three separate locations. I am unsure if this is actually providing me with the correct values, and was hoping someone can look this over to see if what I am doing makes sense / is actually right. Any help refining this would also be really helpful, as I'm sure this is not elegant. var portal = Portal("https://www.arcgis.com");
// Group the features by the BLA
var BLA = Filter(FeatureSetByPortalItem(portal,"xxx",0,['BLA_Used', 'Survey_Date', 'Name'],false), "NOT Name = 'Rental%'");
var groupBLA = GroupBy(BLA,
["Survey_Date"],
[
{ name: "BoatLaunchArea", expression: "BLA_Used", statistic: "MIN" },
{ name: "cntBoats", expression: "BLA_Used", statistic: "COUNT" },
{ name: "date", expression: "Survey_Date", statistic: "MIN" },
]
);
var combinedDict1 = {
fields: [
{ name: "sdate", type: "esriFieldTypeDate" },
{ name: "dow", type: "esriFieldTypeInteger" },
{ name: "BLA", type: "esriFieldTypeString" },
{ name: "cntSurveyScans", type: "esriFieldTypeInteger" },
],
geometryType: "",
features: [],
};
var i = 0;
for (var m in groupBLA) {
combinedDict1.features[i] = {
attributes: {
BLA: m["BoatLaunchArea"],
cntSurveyScans: (Floor(m["cntBoats"] / 2)),
sdate: DateDiff(m["Survey_Date"], Date(1970, 0, 1), "MM/DD/yyyy"),
dow: Weekday(m["Survey_Date"]),
},
};
i++;
}
var dict1 = FeatureSet(Text(combinedDict1));
var groupDOW = GroupBy(dict1,
[
{ name: "dow", expression: "dow" },
{ name: "BLA", expression: "BLA" }
],
[
// { name: "BLAName", expression: "BLA", statistic: "MIN" },
// { name: "surveydate", expression: "sdate", statistic: "MIN" },
{ name: "countBoats", expression: "BLA", statistic: "COUNT" },
]
);
var combinedDict2 = {
fields: [
{ name: "BoatArea", type: "esriFieldTypeString" },
{ name: "wday", type: "esriFieldTypeInteger" },
{ name: "avgBoats", type: "esriFieldTypeInteger" },
],
geometryType: "",
features: [],
};
var x = 0;
for (var n in groupDOW) {
combinedDict2.features[x] = {
attributes: {
BoatArea: n["BLA"],
wday: n["dow"],
avgBoats: (Floor(Average(n["countBoats"] / 2))),
},
};
x++;
}
return FeatureSet(Text(combinedDict2)); One additional note...towards the bottom for 'avgBoats', I have divided by 2 in addition to using 'Average' because each boat is scanned twice - once when launching and once when coming off water. I wanted to divide by 2 so each boat is only counted once, and then Average what was left. Here is a sample of the output: Any help would be appreciated!
... View more
11-23-2021
12:46 PM
|
0
|
7
|
3792
|
|
POST
|
Hi - Cross-posting from ArcGIS REST API question board...see original version here. I am using this blog from @AaronPulver to create webhooks in Power Automate for a Field Maps workflow. Currently, I am attempting to set up a webhook that generate an email when a new record is added to a related table - this portion works perfectly. What I really want to do is also return the attributes from the point feature it is related to so that I can include one of the attributes in my email notification. Looking at the Extract Changes documentation, I see that I should be able to include "includeRelated=true" to return the related record, however I am unsure of where to add this query in. I have attempted to include this at a variety of locations without luck. Currently I have included this within the "Check Status" HTTP request...the Flow runs, but attributes from the related record are not returned. I have also attempted to include this under "Get Edits" and "Get Edits Redirect" also with no luck. Any suggestions would be appreciated! Erica
... View more
11-22-2021
10:45 AM
|
0
|
1
|
1382
|
|
POST
|
Hi - I am using this blog from @Anonymous User to create webhooks in Power Automate. Currently, I am attempting to set up a webhook that generate an email when a new record is added to a related table - this portion works perfectly. What I really want to do is also return the attributes from the point feature it is related to so that I can include one of the attributes in my email notification. Looking at the Extract Changes documentation, I see that I should be able to include "includeRelated=true" to return the related record, however I am unsure of where to add this query in. I have attempted to include this at a variety of locations without luck. Currently I have included this within the "Check Status" HTTP request...the Flow runs, but attributes from the related record are not returned. I have also attempted to include this under "Get Edits" and "Get Edits Redirect" also with no luck. Any suggestions would be appreciated!
... View more
11-22-2021
08:08 AM
|
1
|
1
|
1466
|
|
BLOG
|
I just tested and this worked perfectly. Thank you for your help, and the fantastic blog.
... View more
11-19-2021
09:03 AM
|
0
|
0
|
2450
|
|
BLOG
|
@Anonymous User This is great - thank you again. Last question. If I want to re-format the email using HTML, how do I format the attribute field names to call them into the email body? With Survey123 I use the syntax triggerBody()?['feature']?['attributes']?['field name'] - is it the same here, or is there documentation that can help me figure out what I should be using? Thank you!
... View more
11-19-2021
07:55 AM
|
0
|
0
|
2459
|
|
BLOG
|
@Anonymous User - thank you, this worked perfectly. If I want to also use this workflow to generate notifications when data are edited, can I find the proper syntax to update in the Extract Changes API documentation? It looks like I should be able to... I am guessing I'd need to make changes within the JSON to do this, in addition to changing the "Change Types" parameter within the Webhook settings at the REST endpoint. Thank you!
... View more
11-19-2021
07:30 AM
|
0
|
0
|
2471
|
|
POST
|
Hi @JamesTedrick - I am having a similar issue...although with time instead of date. I have an existing survey XLSForm which is formatted like this...the calculation works perfectly. The number of minutes elapsed is returned. I want to modify the survey to do some behind the scenes calculations so that field staff do not need to enter the colon (:) between hours and minutes. I've modified the XLSForm to this, and now my line 48, "Time_Elapsed" is throwing a type mismatch error. I can not figure out what I've done wrong as I feel like the results of line 43 (Interview_TimeColon) and line 47 (StartFishing_TimeColon) are not all that different from what was being input in lines 40 and 44 (e.g. 10:45 vs. 1045, which is then calculated to 10:45). Do you have any suggestions? I did test what you show in the example XLS above, however it did not work - I continue to get a mismatch error. Thank you,
... View more
11-15-2021
12:20 PM
|
0
|
1
|
3687
|
|
POST
|
Hi Phil, So, my XLS has keywords (the 'name' parameter is/has always been present since the XLS was initially published), and I am using the following query statement in the begin repeat row of the bind::esri:parameters column: query allowUpdates=true I am not using any query statement in the Image row(s) however, and after re-reading the documentation I am unsure if maybe that is my problem. Specifically here, under Images in the second paragraph, it states that if I do not want users to be able to add new images, I should add a query statement "allowAdds=false" in the bind::esri:parameters column. Also, these images have mostly (probably all) been added directly from the Survey123 field app on each end user's iPad, although there could be a mix of the users taking photos with the camera and attaching photos via the "file" option. However...I did just republish the data because I needed to make some schema changes before I could make some updates to the survey. Would this impact the ability of the photos to show in the Inbox, even if they were all originally captured via the field app? See here for example of XLS Form parameters - this is the main repeat: This is the nested repeat: Thank you for the help.
... View more
10-25-2021
05:32 AM
|
0
|
2
|
5750
|
|
POST
|
Hi Phil, I am trying to test this now. I just republished the survey at v. 3.13.234 and my field app is also at v. 3.13.234, however I can not view images when opening a record from the Inbox. I've refreshed the Inbox and I know there is an image...however it doesn't show up. The image is within a repeat. Would that affect my ability to see it? Thank you,
... View more
10-22-2021
06:09 AM
|
0
|
4
|
5808
|
|
BLOG
|
@Anonymous User - I am making my way through your blog on how to set this up. I am curious how I would update the "Parse Edits" step's JSON to include specific attributes from my feature layer. Ideally, I'd like to set up the email so that it dynamically includes attribute information. I guess I am thinking like what I am able to do if I set up a webhook for Survey123. Here is an example of what I am talking about: I've done this for a different webhook where a survey triggers an update to another hosted feature layer. I have been comparing your JSON from the "Parse Edits" step with the JSON I use in that other webhook and just can't figure out where I'd insert something similar to call specific fields. In my other webhook, I use the following JSON to call specific attributes from the feature layer: {
"type": "object",
"properties": {
"objectIdFieldName": {
"type": "string"
},
"objectIds": {
"type": "array",
"items": {
"type": "integer"
}
},
"WR_Case_Number": {
"type": "string",
"items": {
"type": "string"
}
},
"Inspection_Date": {
"type": "string",
"items": {
"type": "string"
}
}
}
} I don't have a ton of experience in how to work with JSON, so any advice would be appreciated on where I should insert this within the "Parse Edits" step. Thank you,
... View more
10-15-2021
10:57 AM
|
2
|
0
|
2582
|
|
POST
|
Hi @Ruth_JiatengXu, I am having a similar issue. It actually appears to be intermittent, but I can't determine the cause. This report template has been around for a while. Last Friday we were having issues so I updated the template to use a smaller map scale. That seemed to temporarily fix it, but we are now seeing the same error again today. This report generates just fine when the condition in the template is not met and a map is not included in the report. Here is the error: Attached is the report template. Any assistance would be great. Thank you,
... View more
10-04-2021
05:43 AM
|
0
|
0
|
1840
|
|
BLOG
|
@Anonymous User I just went into Testflight and I am still seeing build version 3.13.229. On the EAC, I see version 3.13.234, but I do not see this in Testflight. I haven't done a beta test in awhile, but think I am doing things correctly...? I just read the fine print and see it can take 24-48 hours for the new build to be approved by Apple and appear in Testflight. Sorry! I can't figure out how to delete this...
... View more
10-01-2021
05:55 AM
|
0
|
0
|
8264
|
|
BLOG
|
@Anonymous User Thank you for that really detailed information. The user who reported this is using a new iPad Mini. The workflow is for our Conservation Easement monitoring and she had me size the photos for the report template so that all of our monitors didn't have to manually re-size full-sized photos once exported to Word. This is the syntax I am using within the report template right now: ${ Related_Table_Photo_Information.Image | size:450:0} With that sizing, it came in so that we could fit two images and tables per page of our report, which is our organization's standard for these reports. Here is what the photo section of the report looked like pre-3.13: Here is what it looks like post-3.13 (iPad Mini): When I go to the Survey123 website and visit the 'data' page for this survey, I save the image by finding it in "form view", I click to view and then I click the download option in the upper right corner of the image. When I bring this into a report manually, I still can't replicate the size because the aspect ratio is different. Personally I don't think this is a huge deal. It doesn't seem like there is much we can do about this if this was a fundamental change to how Survey123 deals with the camera/photos. It seems like I might want to play with the sizing I specify in the report template to see if I can get the photos to not look squashed. I will pass on the great information you shared above to my user. Thank you, Erica
... View more
09-30-2021
06:27 AM
|
1
|
0
|
8342
|
|
BLOG
|
@Anonymous User - With this new version, was there also some sort of automatic, behind the scenes change to photo attachment sizes? We have a survey which has not been republished at version 3.13 (it was last published with version 3.12 on August 16, 2021), however users are reporting a change in photo attachment sizing. We compared photo dimensions from before we updated to 3.13 and from after we updated. Pre 3.13 photo dimensions were 1920 x 1440. Post 3.13 upgrade and photo dimensions are 1920 x 1080. This is resulting in some squashed looking photos in our report template and when we export the full/original photo from the Survey123 website. The only change is that our MDM has updated all devices to Survey123 v. 3.13. Is there a way we can get back to the dimensions of 1920 x 1440? Any assistance would be appreciated. Erica
... View more
09-29-2021
10:02 AM
|
0
|
0
|
8388
|
|
BLOG
|
@Anonymous User - I just opened an Esri support case and sent in the XLSForm for the survey experiencing the most issues. I sent you a direct message with the Esri Case # in case this is useful. Erica
... View more
09-28-2021
07:16 AM
|
0
|
0
|
8470
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-06-2022 09:14 AM | |
| 6 | 10-24-2024 12:04 PM | |
| 1 | 04-28-2021 09:14 AM | |
| 3 | 09-06-2022 11:53 AM | |
| 1 | 01-17-2024 05:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-14-2025
01:16 PM
|