|
POST
|
I have a survey with a repeatable section that contains "Time" as a required question. The survey can be edited from the Inbox. When the Inbox is refreshed and the survey is opened, a new repeat is added. When we attempt to submit we get an error that the second record entered in the repeat needs "Time" because it is required. We are forced to go back and re-enter the "Time". It seems as if the survey is losing/deleting the time that was originally submitted for that record. The entire repeat is set to query allowUpdates=true. This occurs in version 3.10 and 3.11 on iPhone and iPad. I am curious if this is a bug or some sort of user error. Thank you, Erica
... View more
11-05-2020
12:45 PM
|
0
|
1
|
931
|
|
POST
|
Hi William, I am very new to this, so I need to look into the SEDF. My goal is to just calculate the "Total Gull Count" daily. The field already exists in the Feature Layer. The layer is edited daily in Collector and I need to tally the counts of different gull species into one total value. The "Total Gull Count" field will be used in maps and Dashboard charts/indicators. I don't want to have to re-publish the data each time; I'd like to leave it alone where it is in ArcGIS Online. For the code sample you provided above, this still does not work when I change the layer index to 1 (this is where the "Total Gull Count" field lives - all of the values being added together also live here). I get the error "index is out of range". Does this not work with a hosted feature layer's related tables? Thank you, Erica
... View more
11-05-2020
05:27 AM
|
0
|
3
|
7119
|
|
POST
|
Hi Josh, I am hoping you might be able to help me out...I am trying to re-purpose the code above to calculate a field in a feature layer that has sync enabled. I am trying to do this in a Notebook in ArcGIS Online. Here is what my code looks like.. from arcgis.gis import GIS
from arcgis import features
from arcgis.features import FeatureLayer
gis = GIS("home")
gis = GIS('https://arcgis.com', 'xxxxxx', 'xxxxxx')
Site_Inspections = gis.content.get("511646881336491988ab0b87817343ad")
Site_Inspections
Site_Inspections_lyr = Site_Inspections.layers[1]
Site_Inspections_lyr.calculate(where="OBJECTID > 0", calc_expression=[{"field": "Total_Gull_Count", "sqlExpression" : "RB_numb + HG_numb + BB_numb + Unknown_Number" }]) I keep getting the following error: ---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-12-b67e0c1245fc> in <module>
----> 1 Total_Gull_Count_lyr = Total_Gull_Count.layers[1]
2
3 Total_Gull_Count_lyr.calculate(where="OBJECTID > 0", calc_expression=[{"field": "Total_Gull_Count", "sqlExpression" : "RB_numb + HG_numb + BB_numb + Unknown_Number" }])
IndexError: list index out of range
I've triple checked my feature service, and the layer I am attempting to do this calculate on is index 1. Does it matter that this is a table? Do you have any suggestions that could help out here? My goal is to schedule this to run daily to update the "Total_Gull_Count" field within my table. Thank you, Erica
... View more
11-04-2020
12:55 PM
|
0
|
0
|
7119
|
|
BLOG
|
Hi Ismael Chivite, I was curious if there were plans to allow surveys with nested repeats to be embedded in Dashboards w/ mode=view. I have a survey w/ nested repeats that some managers want to be able to review for accountability purposes. I was hoping I'd be able to use a Dashboard to do this, so they could select a record and view the full contents of the survey in one easy-to-read window. When I attempt it, I get the message "This survey contains one or more nested repeats, which are not supported in the view or edit mode of the Survey123 web app." The thought here is, managers can review submissions without having to export surveys to the custom report template. The only other methods I've found for doing this involves a "List" and multiple "Details" elements in a Dashboard, which is not very user friendly or streamlined. I've run into similar issues with Experience Builder. Thank you, Erica
... View more
11-02-2020
07:39 AM
|
0
|
0
|
41230
|
|
BLOG
|
Yeah - this survey is a bear. I was able to get this to work using the coalesce function. I've never used it before (or even seen it used before), but it was able to fix this issue. Inside of the repeat I added 31x3 'calculate' field types with the bind::esri:fieldType set to null, and bind::type set to int; then I used the coalesce function in the 'calculation' column. Outside of the repeat, I changed my sum calculation to sum(${coalesce}). Now that I see how it works, it seems like a very powerful calculation to deploy. Thank you for all of your help with this!
... View more
10-01-2020
01:05 PM
|
0
|
0
|
86120
|
|
BLOG
|
That is interesting to know. Even though I don't have a workflow like this now, it is good to be aware of. Thanks for sharing that!
... View more
09-30-2020
12:03 PM
|
0
|
0
|
18618
|
|
BLOG
|
This doesn't work. Without the relevant, even with a calculation in there fields show regardless of what is selected for the violation type. Like I said, with 282 fields, this just doesn't work. Here is one portion of the survey's XLS: Here is what the survey looks like when previewing in Connect: I think that might illustrate why relevant statements are a must. If you are referring to a calculate in the "type" column of the XLS...this also will not work because the user needs to be able to select a violation code - e.g. 2a1 - and enter a number. My calculation was set so that at the worst the field gets a value of 0 if the violation code isn't selected, and if violation code 2a1 is selected, the field get's a 1 that the user can then increase to represent the actual number of violations (sometimes there will be multiple -- one violation code could have 3 people = 3 violations). I am using "type" = calculate outside of the repeat to sum up all values for one violation type in the repeat.
... View more
09-30-2020
12:00 PM
|
0
|
0
|
86120
|
|
BLOG
|
Perhaps since it is a second survey Survey123 doesn't view it as an "edit". I wonder if you could revert the Survey123 Setting>Webhook to trigger event=new survey and add a conditional to your Power Automate webhook to control when it is triggered. I have only done this workflow using a single survey for submitted and edited records.
... View more
09-30-2020
10:47 AM
|
0
|
0
|
18618
|
|
BLOG
|
Hi Doug, It looks like removing the relevant statements work, however this isn't practical for me as I have 282 fields - imagine the nightmare. I want my users to only see the fields relevant to the violation code they have selected, hence the relevant statements. I really just need a way for the relevant statements to stay in place but to ensure that all 282 fields are 0 even if they haven't been "activated" via the relevant statements so that my sum statements work. Then selected violations would get some # greater than 0. I was hoping a calculation could help with that, but I haven't figured out the proper calculation either inside the repeat or outside of it. Ismael Chivite - do you have any thoughts on this problem?
... View more
09-30-2020
10:38 AM
|
0
|
0
|
86120
|
|
BLOG
|
Hi Dave, For your second webhook, did you go into the Survey123 website and the view the Settings > Webhooks for your survey? You need to modify the webhook's settings here so that trigger events = existing record edited. Until you do this, this webhook will not trigger properly when data is edited.
... View more
09-30-2020
10:20 AM
|
0
|
0
|
18618
|
|
BLOG
|
Hi Paul Sweeney - Somewhere between testing this and publishing this things are not working. I am feeling extra dense about it at this point. I have got to be missing something simple - I just can't figure it out. I created 31x3 questions within my repeat (one per violation code per type of thing [citation, written warning, violation]) - totaling 293 fields within the repeat to deal with this. Outside of the repeat, I have 31x3 calculations with the sum (field1) + sum (field2) + sum (field3). These still do not work properly when a violation code (e.g. 2a1) is not filled in for each of the three options. I feel like it is because I don't have an "if" statement calculation for each field within the repeat. I am having a hard time creating a statement that works...I basically need every single field to have a value of 0 (at least) for the sum calculation outside of the repeat to work. I've added in these statements, but the calculation still doesn't work properly... if(selected(${cmr_violations1}, '2a12'), 1, 0) if(selected(${cmr_violations2}, '2a12'), 1, 0) if(selected(${cmr_violations3}, '2a12'), 1, 0) Calculation for final sum: sum(${ParkTicket2a12First}) + sum(${ParkTicket2a12Second}) + sum(${ParkTicket2a12Third}) I've also tried this calculation for the final sum, but that also doesn't work: if(sum(${ParkTicket2a12First}), ${ParkTicket2a12First}, 0) + if(sum(${ParkTicket2a12Second}), ${ParkTicket2a12Second}, 0) + if(sum(${ParkTicket2a12Third}), ${ParkTicket2a12Third}, 0) My XLS is here if you would like to take a look at it. Thank you, Erica
... View more
09-30-2020
06:45 AM
|
0
|
0
|
86120
|
|
BLOG
|
Ismael Chivite I am wondering if it is possible to calculate the statistic sum for multiple fields. I am attempting this syntax - ${WachusettSudbury_Region_Daily_Patrol_Log | stats:"sum,SumCMRViolations2a12" + "sum,SumParkTicket2a12"} When I upload my report template, I do not get an error. I am also able to generate a report, however the output is: [objectObject]. I am wondering if this is not possible or if I am doing something wrong. Thanks!
... View more
09-29-2020
10:27 AM
|
2
|
0
|
22171
|
|
BLOG
|
Ismael Chivite - the blog post is great. I figured out that the error I received above was related to "curly" quotes. Thank you for including how to disable that in Word!
... View more
09-29-2020
08:56 AM
|
0
|
0
|
3265
|
|
BLOG
|
Hi Survey123 team, I am attempting lots of repetitive calculations and running into some issues I hope you can help with. I am designing a "Daily Log" survey where the repeat is for creating multiple "Log Entries". Each entry can record up to three violation codes; our violation code list consists of 31 choices. For each violation code, the # violations, # written warnings and # citations can be recorded. Violation codes can be collected in any order, in each entry. Sometimes there are no violations in an entry. Sometimes there will be 1, sometimes 2, sometimes 3. They can be recorded in any order. See example in photo 1 at bottom. I am attempting a series of calculate questions outside of the repeat so that we can determine, per violation code, the # violations, # written warnings and # citations. I am running into issues because if (using photo 1 below as an example) my "select first CMR violation type" is 2a1 in my first repeat "entry", but my "select first CMR violation type" is 2a2 in my second repeat "entry" it is adding them together anyways - giving me an incorrect total. These calculations work correctly if my "select first CMR violation type" is 2a1 in my first repeat "entry"; if in my second repeat "entry" I leave "select first CMR violation type" blank and then select 2a1 as my "select second CMR violation type" - in this situation, they are tallied properly. These are the calculations I am using: Each calculation also has a relevant statement for the correct violation code. This is what my repeat looks like: I am happy to share my XLS if anyone is able/willing to help! Thank you in advance!! Photo 1:
... View more
09-16-2020
12:03 PM
|
0
|
0
|
86120
|
|
BLOG
|
Hi Ismael Chivite, I look forward to the blog. I am attempting this on one of my surveys and am receiving an error when generating a preview report. Oddly, the syntax is approved when I upload my template. Here is the error: Here is the report template syntax: This is all placed within a summary section.
... View more
08-24-2020
10:21 AM
|
0
|
0
|
3265
|
| 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
|