|
BLOG
|
I am curious how or if this takes into account the orientation of the device - portrait vs landscape. This may be a totally different scenario from this new appearance, however I am curious because we had done testing a few years ago in regards to the internal device compass direction that is captured in a photo's EXIF data. What we found was that if we wanted users to take landscape-oriented photos, they needed to be consistent about how they did this. We instruct users to always take landscape oriented photos with the "home button" (bottom of device) in their right hand. Then, we were able to accurately calculate the compass direction within a report template based on that known orientation of the device at the time of capturing the photo. Would a similar sort of calculation need to take place within the survey form for this type of question depending on how users are holding their device when completing their survey? We use this calculation within a report template to determine the actual compass direction that the photo is facing from photo EXIF data. Again, maybe this is different because it is relating to a photo/EXIF data/report templates, but I thought this was worth asking. ${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=0.0) && ((Related_Table_Photo_Information.Image | getValue:“direction”)<=22.4))} E ${/}${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=22.5) && ((Related_Table_Photo_Information.Image | getValue:“direction”)<=67.4))} SE ${/}${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=67.5) && ((Related_Table_Photo_Information.Image | getValue:“direction”)<=112.4))} S ${/}${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=112.5) && ((Related_Table_Photo_Information.Image | getValue:“direction”)<=157.4))} SW ${/}${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=157.5) && ((Related_Table_Photo_Information.Image | getValue:“direction”)<=202.4))} W ${/}${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=202.5) && ((Related_Table_Photo_Information.Image | getValue:“direction”)<=247.4))} NW ${/}${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=247.5) && ((Image | getValue:“direction”)<=292.4))} N ${/}${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=292.5) && ((Related_Table_Photo_Information.Image | getValue:“direction”)<=337.4))} NE ${/}${if (((Related_Table_Photo_Information.Image | getValue:“direction”)>=337.5) && ((Related_Table_Photo_Information.Image | getValue:“direction”)<=360.0))} E ${/}
... View more
12-09-2021
09:08 AM
|
0
|
0
|
6689
|
|
POST
|
I was able to resolve this - there were two issues. First, within my data expression to get the Average Private Launches per Day of Week, there were two things wrong. The filter expression in line 4 was incorrect and I needed to update it to say "NOT Name like 'Rental%'" instead of "Not Name = 'Rental%'". The count from line 16 is really the count of total survey scans - I need to drill this down to the number of boats. Since each boat has 2 surveys completed each day (for launch/retrieval), I needed to divide this value by 2 in line 31. var portal = Portal("https://www.arcgis.com");
// Group the features by the BLA
var BLA = Filter(FeatureSetByPortalItem(portal,"###",0,['BLA_Used', 'Survey_Date', 'Name'],false), "NOT Name like 'Rental%'");
// group by boat area and date, return count of launches i.e., boat count
var groupBLA = GroupBy(
BLA,
[
{name: "the_year", expression: "EXTRACT(YEAR FROM Survey_Date)"},
{name: "the_month", expression: "EXTRACT(MONTH FROM Survey_Date)"},
{name: "the_day", expression: "EXTRACT(DAY FROM Survey_Date)"},
{name: "BLA", expression: "BLA_Used"}
],
[
{ name: "survey_count", expression: "BLA_Used", statistic: "COUNT" }
]
);
// empty feature array
var features = [];
// iterate over grouped featureset to populate array
for (var g in groupBLA){
var wday = Weekday(Date(g['the_year'], g['the_month']-1, g['the_day']))
var feat = {
attributes: {
BoatArea: g['BLA'],
wday: wday,
boats: g['survey_count']/2,
wday_label: Decode(wday, 0, 'Sunday', 1, 'Monday', 2, 'Tuesday', 3, 'Wednesday', 4, 'Thursday', 5, 'Friday', 6, 'Saturday', '')
}
}
Push(features, feat)
};
// pass feature array into dict
var outDict = {
fields: [
{ name: "BoatArea", type: "esriFieldTypeString" },
{ name: "wday", type: "esriFieldTypeInteger" },
{ name: "boats", type: "esriFieldTypeInteger" },
{ name: "wday_label", type: "esriFieldTypeString" },
],
geometryType: "",
features: features
};
// convert dict to FeatureSet
return FeatureSet(Text(outDict)) Next, within the data expression to get the Count of Private Launches by Day of Week, I needed to correct the Filter expression in line 5 the same way I did above. I also commented out some redundant lines within the GroupBy statement on line 7. var portal = Portal("https://www.arcgis.com");
// Group the features by the BLA
var BLA = Filter(FeatureSetByPortalItem(portal,"###",0,['BLA_Used', 'Survey_Date', 'Name'],false), "NOT Name like 'Rental%'");
var groupBLA = GroupBy(BLA,
["Survey_Date", "BLA_Used"],
[
//{ name: "BoatLaunchArea", expression: "BLA_Used", statistic: "MIN" },
{ name: "cntBoats", expression: "BLA_Used", statistic: "COUNT" },
//{ name: "date", expression: "Survey_Date", statistic: "MIN" },
]
);
var combinedDict = {
fields: [
{ name: "sdate", type: "esriFieldTypeDate" },
{ name: "dow", type: "esriFieldTypeInteger" },
{ name: "BLA", type: "esriFieldTypeString" },
{ name: "cntSurveyScans", type: "esriFieldTypeDouble" },
],
geometryType: "",
features: [],
};
var i = 0;
for (var m in groupBLA) {
combinedDict.features[i] = {
attributes: {
BLA: m["BLA_Used"],
cntSurveyScans: (m["cntBoats"] / 2),
sdate: DateDiff(m["Survey_Date"], Date(1970, 0, 1), "MM/DD/yyyy"),
dow: Weekday(m["Survey_Date"]),
},
};
i++;
}
return FeatureSet(Text(combinedDict)); This resulted in consistent and verifiable results when comparing data between the data expression and Excel: BLA 1 – Private Launches, Saturday AVG serial chart = 18 AVG Excel = 17.88
... View more
12-08-2021
08:07 AM
|
0
|
0
|
3550
|
|
POST
|
Hi @CraigGillgrass - Is it still planned that Workforce will eventually be "absorbed" by Field Maps and go away as a standalone app? Thanks,
... View more
12-07-2021
10:00 AM
|
0
|
0
|
1847
|
|
POST
|
I resolved this using the original set of questions (first screen capture above) in conjunction with an input mask specified for lines 40 & 44. Within the bind::esri:inputMask column, I specified 99:99. This allows users to just enter numbers, the colon is automatically added and the 'Time Elapsed' calculation works perfectly.
... View more
12-07-2021
09:59 AM
|
0
|
0
|
3602
|
|
POST
|
With the help of a co-worker, I have successfully returned related records using an adapted version of @AaronPulver 's blog (see above for link) for using Power Automate with a feature service/Field Maps. Following Aaron's blog up until the Get Edits Redirect step (housed within the Check Status Until Ready step), we then deviate and use the following workflow to retrieve the related records of the table that the webhook is associated with. Basically the goal is this - a new record is submitted to a related table; within my webhook, I want to also retrieve the parent feature information to use within an email notification.
... View more
12-07-2021
09:55 AM
|
0
|
0
|
1346
|
|
POST
|
With the help of a co-worker, I have successfully returned related records using an adapted version of @Anonymous User 's blog (see above for link) for using Power Automate with a feature service/Field Maps. Following Aaron's blog up until the Get Edits Redirect step (housed within the Check Status Until Ready step), we then deviate and use the following workflow to retrieve the related records of the table that the webhook is associated with. Basically the goal is this - a new record is submitted to a related table; within my webhook, I want to also retrieve the parent feature information to use within an email notification.
... View more
12-07-2021
09:54 AM
|
0
|
0
|
1293
|
|
POST
|
Hi @ZhifangWang - I have a Survey report template which is attempting to print 34 photos from inside a repeat. When we attempt to print the report, we get this error: My end users did some testing on Friday and found that: They were able to print a report with 1 photo They were able to print a report with 11 photos They were NOT able to print a report if it had over 15 photos. They cleared browser caches and tried again, but that did not help. This morning I republished the Survey from Connect v. 3.13.234 and tried to generate the report again, however this also did not work. I also re-uploaded by report template to trigger the syntax checker, however the template did not throw any errors during upload. The report template is structured to include information from both outside and inside the repeat (this survey has nested repeats). No maps are included in the output, just the photos and attribute information for them (which is stored in two places - the same table as the photo and a nested repeat). I also opened a Technical Support request in addition to posting this, however any help would be greatly appreciated. My support case number is #02948651. Thank you,
... View more
12-06-2021
05:44 AM
|
0
|
1
|
3153
|
|
POST
|
Wow - talk about overthinking something. Thank you! I haven't explored input masks yet - this is super handy.
... View more
12-02-2021
07:59 AM
|
1
|
0
|
2324
|
|
POST
|
Hi - I am having a type mismatch issue with some time calculations. I have an existing survey XLSForm which is formatted like this...the calculation works perfectly. The number of minutes elapsed is returned. In this instance, the user is prompted to enter two times in this format - XX:XX and then the third line determines minutes elapsed. 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 (we want the time to be entered like XXXX). I've modified the XLSForm to do 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 the first 2 lines from the screen capture above (e.g. 10:45 vs. 1045, which is then calculated to 10:45). Things I have tried - changing 'type' column to calculate for all intermediate calculations (lines 41 to 43 & 45 to 47) changing bind::type column to 'time' for lines 43 and 47 (second screen capture) changing bind::esri:fieldType to 'null' for all intermediate calculations changing bind::esri:fieldType for line 48 from integer to string to no bind::esri:fieldType changing bind::esri:fieldType to 'date' for lines 43 and 47 Does anyone have any suggestions? I also did test using the solution from this post, but it did not work. Thank you,
... View more
11-30-2021
12:23 PM
|
1
|
2
|
2352
|
|
IDEA
|
If this idea ever got implemented, I think it would save many people lots of time in re-configuring web maps, apps or Dashboards that contain "joined view layers" if a hosted feature layer schema needs to be updated.
... View more
11-26-2021
06:34 AM
|
0
|
0
|
4835
|
|
POST
|
Hi @jcarlson - I looked at sum, min, max and those are also inconsistent. Here is how I am getting these inconsistent values... 1. First, I updated my data expression from that last post on Wednesday to remove the Floor - this was good because I was eliminating many 0.5 values which should not happen. That data expression powers the "Private Launches per DOW" and "Rental Launches per DOW" charts which you can see at the Dashboard I have linked to below (these charts show all data, but can be filtered using the 'Select Boat Launch Area' option at top). 2. Filter the chart that results from that data expression by day of week and take all values presented and enter into Excel. Calculate average, sum, max, min. 3. Open serial chart config for the "average private launches per DOW" and change statistic to compare results for specific BLA and DOW to see how they compare. Here is one example: For Saturday BLA1 - AVG - 42 (Excel) vs. 27 (serial chart) SUM - 1,145 (Excel) vs. 654 (serial chart) MAX - 88 (Excel) vs. 64 (serial chart) MIN - 4 (Excel) vs. 2 (serial chart) You can see a public version of my current Dashboard here - https://mass-eoeea.maps.arcgis.com/apps/dashboards/0773a2c3a27b4690b8632b082e33690c I am mystified by these differences. Also, I would expect that Saturday & Sunday would have a much higher average use per DOW as these are the two most popular boating days. I would be interested in your thoughts on this. Thank you,
... View more
11-26-2021
06:22 AM
|
0
|
1
|
3669
|
|
IDEA
|
Trendlines would be a great addition to Dashboard serial charts.
... View more
11-24-2021
10:00 AM
|
0
|
0
|
1023
|
|
POST
|
Hi @jcarlson This is awesome! It worked perfectly. I do have a follow-up question however relating to what you mentioned above about time stamps. Here is another data expression - this is the one that gives me a count of boat usage by day of week for the season. I am wondering if the fact that I did not strip away the time stamps here will result in an incorrect output. I'd be interested in your thoughts. This uses the same data as above. The reason I ask...I took the graph which is generated by the script below and filtered for just "BLA1". I took all of the values provided for one day of the week (Saturday) and used the average function in Excel to see if the average was the same as what was provided by the graph I created using the script above - it was not (27.3 vs ~18 in Excel). Theoretically, I could add up all of the Saturday counts for BLA1, average them in Excel and get the same value as what the above script provides. var portal = Portal("https://www.arcgis.com");
// Group the features by the BLA
var BLA = FeatureSetByPortalItem(portal,"faadbf5e0ef44523a8eb0d37adab33aa",0,['BLA_Used', 'Survey_Date'],false);
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 combinedDict = {
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) {
combinedDict.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++;
}
return FeatureSet(Text(combinedDict)); The chart is configured like this: Thank you for your help!
... View more
11-24-2021
08:55 AM
|
0
|
3
|
3700
|
|
POST
|
Hi @jcarlson - Thank you. So something in the code you suggest is not working properly for me once I get to the actual graphing portion. I was having this issue last week in my testing with trying to get this data expression to work: You can see the value (y) axis is not correct - I end up with decimal values of 0.1 for everything. I do not really understand why this is happening. Also, to answer your question about the "sdate" field in my original script - this came from a separate data expression that I wrote so I could graph the count of boats per day of week through the entire boating season (April - October) so that we could have a sense of overall use trends throughout the boating season. I figured I'd use that as a basis for this "average use by weekday" data expression you are helping me with now. The "sdate" field allowed me to include the date in the featureSet, and then I used that to calculate Weekday for each row in my featureSet. The graph output of the other data expression (where "sdate" originated) is: If you have the time or inclination...here is a View of the data I am working with if you are able to test this with the real data...https://mass-eoeea.maps.arcgis.com/home/item.html?id=faadbf5e0ef44523a8eb0d37adab33aa#overview Thank you,
... View more
11-24-2021
05:45 AM
|
0
|
5
|
3710
|
| 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
|