BLOG
|
@SeanKMcGinnis - I recently went thru the work of clearing out all of my duplicate connections for ArcGIS and Survey123 in Power Automate. I created two new connections and rebuilt all of my flows to ensure that my Connections list was clean and I stopped having so many issues with flows failing and needing to be fixed. This has worked great until today. I got an error from one of my flows that uses the Survey123 Create report action. The failure was for a missing token. When I go into Power Automate > Connections, I see that my Survey123 Connection shows a Status = Connected. I know that if I go into the broken flow and click the ... on the top corner of the Create report action, that I can use +Add new connection to fix the flow, however I also know this adds a duplicative Survey123 connection to my list of available Connections which is annoying/not ideal/difficult to manage. Do you have any suggested strategies for dealing with this situation? My Organization has ArcGIS Online and I am not able to find a way to increase token length thru Organization settings. I've posted about this as a question in both the Power Automate and Survey123 communities in the hopes of a quick response. Any help or advice on dealing with this would be amazing. The Create report action could be great, but this is incredibly frustrating and makes it unreliable and not really a tool worth using because of it. Question posted in Power Automate community here. Thank you,
... View more
01-12-2024
04:54 AM
|
0
|
0
|
562
|
POST
|
Hi - I use Power Automate for a fair bit of automation with Survey123/ArcGIS Online and I am a bit frustrated with the "Create report" action. I've received a message that the flow failed and it seems the ultimate culprit is happening within the "Create report" step of my flow as I receive "Missing parameters required: \"token\"". Under my Connections options in Power Automate, I can see my Survey123 Connection shows a status of Connected, however the "Create report" action is still failing on credentials. I know that if I edit the flow, I can go to the "Create report" step, click the ... option in the top corner and select +Add new connection, however I also know that will create a new/second Survey123 connection under my list of Connections ,which I really do not want as it becomes a total nightmare to manage connections when you have many of them for the same thing. Are there any viable workarounds or strategies for this issue? Are there plans to improve the "Create report" action so that it is actually a viable and reliable tool (which IMO it very much is currently not)? My organization uses ArcGIS Online, so increasing token life doesn't seem to be an option (I can't find it under Organizational settings). This is cross posted in the Survey123 community as well - here. Thank you,
... View more
01-12-2024
04:46 AM
|
0
|
1
|
236
|
POST
|
Hi - I use Power Automate for a fair bit of automation with Survey123/ArcGIS Online and I am a bit frustrated with the "Create report" action. I've received a message that the flow failed and it seems the ultimate culprit is happening within the "Create report" step of my flow as I receive "Missing parameters required: \"token\"". Under my Connections options in Power Automate, I can see my Survey123 Connection shows a status of Connected, however the "Create report" action is still failing on credentials. I know that if I edit the flow, I can go to the "Create report" step, click the ... option in the top corner and select +Add new connection, however I also know that will create a new/second Survey123 connection under my list of Connections ,which I really do not want as it becomes a total nightmare to manage connections when you have many of them for the same thing. Are there any viable workarounds or strategies for this issue? Are there plans to improve the "Create report" action so that it is actually a viable and reliable tool (which IMO it very much is currently not)? My organization uses ArcGIS Online, so increasing token life doesn't seem to be an option (I can't find it under Organizational settings). Thank you,
... View more
01-12-2024
04:45 AM
|
0
|
3
|
466
|
POST
|
Hi - I'm hoping for some help with my syntax. The first part of this expression is working well. I can not figure out where I am going wrong starting at line 105 with the Clip function. I've verified everything above this is working thru use of Console, but can't get any further. I am wondering if because I am trying to feed Clip a FeatureSet instead of a $feature (as shown in the documentation) I am getting an error. Do any of the Arcade wizards on here have suggestions? @jcarlson @XanderBakker @JohannesLindner The goal here is to use Dashboards/Arcade to provide non-GIS people with information needed for reporting w/o having to open Pro and do geoprocessing, or without needing a Creator license to use the AGOL Spatial Analysis tools. I was hoping this might be a viable workaround. Thank you! // custom memorize function to increase performance of featureset
function Memorize(fs) {
var temp_dict = {
fields: Schema(fs)['fields'],
geometryType: Schema(fs).geometryType,
features: []
}
for (var f in fs) {
var attrs = {}
for (var attr in f) {
attrs[attr] = Iif(TypeOf(f[attr]) == 'Date', Number(f[attr]), f[attr])
}
Push(
temp_dict['features'],
{attributes: attrs, geometry: Geometry(f)}
)
}
return FeatureSet(Text(temp_dict))
}
// variable to define the portal URL
var portal = Portal("https://mass-eoeea.maps.arcgis.com");
// Quabbin Drainage Basins
var QUAB = FeatureSetByPortalItem(portal, "6b878308af9646af8239d2251a26fe15", 0, ['DISTRICT', 'SUB_BASIN', 'AREA_ACRES'], true);
// Ware River Drainage Basins
var WARE = FeatureSetByPortalItem(portal, "60c237cb9b53472a91c331785c035954", 0, ['DISTRICT', 'SUBDISTRICT_BASIN', 'Acres'], true);
// Wachusett Subbasins
var WACH = FeatureSetByPortalItem(portal, "702f5bf477d7451aa27abc939c9b5b65", 0, ['Big_Wshed', 'Wshed', 'Area_Acres'], true);
// Create a FeatureSet with all Basins from Quabbin, Ware and Wachusett
var int_dict = {
fields: [
{name: "DistrictName", type: "esriFieldTypeString"},
{name: "BasinName", type: "esriFieldTypeString"},
{name: "Acres", type: "esriFieldTypeDouble"},
],
geometryType: "esriGeometryPolygon",
"spatialReference": {
"wkid":102100,
"latestWkid": 3857
},
features: [],
};
// Fill intermediate FeatureSet with Basin Info
var i = 0;
for (var q in QUAB) {
//Console(q)
int_dict.features[i] = {
attributes: {
'DistrictName': q["DISTRICT"],
'BasinName': q["SUB_BASIN"],
'Acres': q["AREA_ACRES"],
},
geometry: Geometry(q),
}
i++;
};
for (var w in WACH) {
int_dict.features[i] = {
attributes: {
'DistrictName': w["Big_Wshed"],
'BasinName': w["Wshed"],
'Acres': w["Area_Acres"],
},
geometry: Geometry(w),
}
i++;
};
for (var r in WARE) {
int_dict.features[i] = {
attributes: {
'DistrictName': r["DISTRICT"],
'BasinName': r["SUBDISTRICT_BASIN"],
'Acres': r["Acres"],
},
geometry: Geometry(r),
}
i++;
};
//Console(Text(int_dict));
//return FeatureSet(Text(int_dict));
var basinDict = FeatureSet(Text(int_dict));
//Console(Text(basinDict));
// DWSP Fee OpenSpace
var dwspOS = Memorize(Filter(FeatureSetByPortalItem(portal, "807b0f1e96444ec28fd06270fb8d3488", 0, ['GIS_ACRES'], true), "OWNER_ABRV ='DCRW'"))
// create an empty feature array
var features = []
// clip dwspOS by int_dict features to determine number acres dwspOS per basin
for (var b in basinDict) {
// get the envelope of each basin feature within int_dict
var envelope = Extent(b)
// determine acres per envelope (basin)
// is clip function limited to working with a single feature rather than a collection of features?
var areaOS = Area(Clip(Geometry(dwspOS), envelope), 'acres')
Console(areaOS)
for (var a in areaOS) {
// do math to determine percent ownership dwspOS acres per basin
var pctOwn = Round(a/basinDict.Acres*100, 1)
//add to array
var new_f = {attributes: {
DistName: a[basinDict.DistrictName],
Basin: a[basinDict.BasinName],
AcresBasin: a[basinDict.Acres],
AcresDWSP: areaOS,
PctOwnership: pctOwn,
}}
Push(features, new_f)
}
}
Console(Text(new_f));
// create a FeatureSet with all of these features
var combined_dict = {
fields: [
{name: "DistName", type: "esriFieldTypeString"},
{name: "Basin", type: "esriFieldTypeString"},
{name: "AcresBasin", type: "esriFieldTypeDouble"},
{name: "AcresDWSP", type: "esriFieldTypeDouble"},
{name: "PctOwnership", type: "esriFieldTypeDouble"},
],
geometryType: "esriGeometryPolygon",
"spatialReference": {
"wkid":102100,
"latestWkid": 3857
},
features: features,
}
//Console(Text(combined_dict));
//return FeatureSet(Text(combined_dict));
return combined_dict
... View more
12-14-2023
08:06 AM
|
0
|
0
|
231
|
POST
|
@DominicRoberge2 that was so helpful! Thank you for those detailed images and also your patience with me! Here was what I ended up doing: div(sub(ticks(addDays(body('Convert_Inspection_Date'),int(items('Apply_to_each')?['Attributes/PHASE_I_INTERVAL']),'yyyy/MM/ddTHH:mm:ss')),ticks('1970-01-01Z00:00:00')),10000) Instead of adding a second Compose, I just updated my original Compose which was using the "addDays" function and nested that inside your EPOCH conversion. The I used outputs from Compose within my ArcGIS "Update a record in a feature layer". It worked perfectly when I tested! Thank you so much!
... View more
12-13-2023
12:47 PM
|
1
|
0
|
646
|
POST
|
@DominicRoberge2 @SeanKMcGinnis Thanks for the suggestion. When I try either of these in a new Compose, I get "Invalid statement" and can't apply the expression: div(sub(ticks(outputs('Get_Phase_1_Inspection_Interval_from_Feature_Layer')?['body/data'],ticks('1970-01-01Z00:00:00')),10000) div(sub(ticks(outputs('Compose'),ticks('1970-01-01Z00:00:00')),10000)
... View more
12-13-2023
09:49 AM
|
0
|
2
|
650
|
POST
|
@DominicRoberge2 @SeanKMcGinnis - Sure, here are the outputs. First is that output from ArcGIS Connector "Get Phase 1 Inspection Interval from Feature Layer". {
"statusCode": 200,
"headers": {
"offset": 1,
"hasMoreData": "no",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"x-ms-apihub-obo": "false",
"Date": "Mon, 11 Dec 2023 20:38:00 GMT",
"ETag": "W/\"342-jBGiEo2buRqe7BgtiCHbyLsmGbM\"",
"X-Powered-By": "Express",
"Content-Length": "834",
"Content-Type": "application/json; charset=utf-8"
},
"body": {
"data": [
{
"attributes": {
"OBJECTID": 45,
"NAT_ID": "MA99999",
"DAM_NAME": "Erica's Dam",
"DAM_LOCATION": "Hubbardston",
"DAM_TYPE": "Concrete",
"DAM_OTH": null,
"YEAR_BUILT": 2500,
"WATERSHED": "Quabbin",
"OWNER": null,
"CARETAKER": null,
"JURISDICTIONAL": "Y",
"PHASE_I_INTERVAL": 730,
"LAST_PHASE_I": 1639242000000,
"SCHED_PHASE_I_INSPEC": 1702314000000,
"SIZE_CLASS": "Small",
"HAZARD_CLASS": "Class I",
"HEIGHT_FT": null,
"LENGTH_FT": null,
"CAPACITY_AcFt": null,
"CREST_ELEV_FT": null,
"SPILLWAY_ELEV_FT": null,
"SPILLWAY_WIDTH_FT": null,
"ELEV_REFERENCE": null,
"OUTLET_TYPE": null,
"ROUTINE_INSPEC_INTERVAL": null,
"LAST_ROUTINE_INSPEC": null,
"ADD_COMMENTS": "TEST ONLY ERICA WILL DELETE WHEN DONE",
"DAM_FILES": null,
"GlobalID": "24b4e810-f399-4146-88cd-919c82b2a459",
"CreationDate": 1702320093451,
"Creator": "DWSP_erica.tefft",
"EditDate": 1702320597270,
"Editor": "DWSP_erica.tefft"
}
}
]
}
} Next, here is the output from "Compose": "2025/12/10T18:47:00" Please let me know if that helps/is what you were looking for. Thank you for your help!
... View more
12-12-2023
12:38 PM
|
0
|
4
|
657
|
POST
|
@DominicRoberge2 @SeanKMcGinnis - This is, I think, exactly what I need, however I am having a hard time applying it. Would either of you be able to help? The initial trigger of this flow is a Survey123 submission. When certain criteria are met, then I get the matching parent record from a feature layer and convert the inspection date from the Survey123 form. Syntax for this conversion is working well: addSeconds('1970-1-1', Div(triggerBody()?['feature']?['attributes']?['INSPEC_DATE'], 1000), 'yyyy/MM/ddTHH:mm:ss') I then use Compose to addDays to my converted dateTime. I am getting the interval from my feature layer. Again, this is workign well: addDays(body('Convert_Inspection_Date'),int(items('Apply_to_each')?['Attributes/PHASE_I_INTERVAL']),'yyyy/MM/ddTHH:mm:ss') I was initially trying to write the outputs from Compose directly to my date attribute field in the bottom "update a record in a feature layer", however I am getting an error when I try this. I stumbled across this post and I think the conversion back to Epoch time is exactly what I need, but can't get it to implement. Here is what I am trying: div(sub(ticks(outputs('Compose')?['body/Compose']),ticks('1970-01-01Z00:00:00')),10000) This results in this error: InvalidTemplate. Unable to process template language expressions in action 'Update_a_record_in_a_feature_layer' inputs at line '0' and column '0': 'The template language expression 'div(sub(ticks(outputs('Compose')?['body/Compose']),ticks('1970-01-01Z00:00:00')),10000)' cannot be evaluated because property 'body/Compose' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions for usage details.'. Any advice? Thank you,
... View more
12-11-2023
12:48 PM
|
0
|
6
|
663
|
BLOG
|
@SeanKMcGinnis I think the community would greatly benefit from some sort of blog to walk them thru how to set up what you've described above. I certainly know I would need some step-by-step guidance to configure such a flow.
... View more
11-28-2023
10:16 AM
|
2
|
0
|
808
|
BLOG
|
@TL2 - could you share a screen capture of this flow? I'd be very interested in setting something similar up. This continues to be a massive pain point of using this technology. I have reminders all over the place to check tokens, but it seems like the length keeps changing!
... View more
11-28-2023
07:18 AM
|
0
|
0
|
836
|
BLOG
|
Hi @AnthonyLatini @SeanKMcGinnis - Can I get some confirmation here on token life - above it seems to be saying 90 days, which I thought was the case for GCC. I'm having some issues with my flows using the ArcGIS connector failing due to authentication issues well before their 90 days is up. Can you please share any insights here? Thank you, Erica
... View more
11-28-2023
07:09 AM
|
1
|
0
|
850
|
POST
|
Hi - I am developing a summary report and running into an issue. After re-reading the tricks of the trade blog about summary reports, I am confused about the behavior I am experiencing. It seems as if filtering and aggregate functions within a summary report should honor the selected records from the Survey123 website when generating a report, unless the !important parameter is used. So far, most of my summary report is working properly and returning what I'd expect. I have a table w/ aggregate functions that is returning responses based on the entire hosted feature layer instead of on the selection made in the Survey123 website. I am wondering if this is expected behavior, or if I have done something wrong with my syntax. Here is the summary section causing issues (full template attached): ** Update: The problem appears to be an issue in multiple sections of the template - namely "Inspection Conditions" and the last section "Details...". In both instances, the counts returned are for all records for each CGP File Number, instead of only the remaining records after Filtering and selections are made on the Survey123 website. In the Survey123 website, I have 9 parent records selected; I've checked and all repeat records have been properly filtered based on the selection. When I generate a preview report, instead of getting the above information for each of the 9 selected records, I get it for every CGP File Number in the hosted feature layer if the 'where' clause has been met. Can anyone provide advice on why this is? Is this expected behavior? Here are the Filters applied on the Survey123 website: This narrows me down to 195 Site Visit Inspections that meet this criteria (and are associated with the 9 parent files), however the total number of Site Visit Inspections for these 9 parent files is being included in the report (673). Thank you,
... View more
09-13-2023
08:53 AM
|
0
|
0
|
346
|
POST
|
I've spent the last week or so performing various tests with Esri Technical Support; it appears that somehow this Survey123 form item in AGOL or the XLSForm itself became corrupted. The solution was to create a brand new Survey123 form and to publish that from the most recent version of Connect. I'd been trying to avoid this as this form is embedded in an Experience Builder app for data entry and has multiple webhooks associated with it, but this seemed like the only option and worked to resolve the issue
... View more
09-13-2023
08:28 AM
|
0
|
0
|
301
|
POST
|
Hi @ZacharySutherby , No, that option is enabled. Thanks,
... View more
09-06-2023
04:56 AM
|
0
|
0
|
330
|
POST
|
Hi - I made a very minor change to an established Survey123 form by updating the label for a question in the form. I republished from Survey123 Connect version 3.18.123. This form is used as a web form, and when my user checked again, the label was not changed. I downloaded Survey123 Connect version 3.18.124 and tried to republish again - same thing, the change was not honored in the web form. I then opened the Survey123 form in the mobile app on my iPhone (app version 3.18.145) and the change was present in the mobile version of the form. This seems to be a bug and I will open a case with Esri Tech Support, but also wanted to ping @IsmaelChivite w/ this info. Thank you,
... View more
08-31-2023
05:32 AM
|
0
|
3
|
457
|
Title | Kudos | Posted |
---|---|---|
1 | 01-17-2024 05:18 AM | |
1 | 08-08-2022 12:50 PM | |
4 | 02-08-2024 12:57 PM | |
1 | 02-08-2024 01:00 PM | |
1 | 05-15-2023 05:58 AM |
Online Status |
Online
|
Date Last Visited |
20m ago
|