|
POST
|
Hi @JulietK the label for a choice can be retrieved using the jr:choice-name() function, as shown in the table of supported functions in the Formulas documentation. Please also refer to this note in the Cascading and external selects documentation. For example, for the Workarea select_one question, you could store the label in another question using a calculation like: jr:choice-name(${Workarea}, '${Workarea}') Hope this helps. Best, Jim
... View more
03-30-2021
06:57 PM
|
1
|
3
|
2675
|
|
POST
|
Hi @JoshBillings in addition to Doug's suggestions, one other option could be to have two integer questions where staff can enter min & max ages, then have a hidden text question that concatenates these into an age range string, e.g. "7 - 12". You could precede this with a select_one that has two choices, e.g. "All ages" or "Specific age range", with the min/max integer questions relevant based on the selection. You could then use an if() statement in the hidden text question to set the string to "All ages" or the concatenated age range. Best, Jim
... View more
03-30-2021
06:53 PM
|
1
|
4
|
4570
|
|
POST
|
Hi @dgray it sounds like you want to nest five if() statements in one expression, is that right? That's definitely doable. As demonstrated in this reply, you can nest multiple if() statements, remembering to ensure each if() contains three arguments. The following example tests five conditions: if(condition, value if true, if(condition, value if true, if(condition, value if true, if(condition, value if true, if(condition, value if true, value if false))))) It's often easier to construct each if() statement separately first and check that each one works, before merging them into one expression. Hope this helps. Best, Jim
... View more
03-22-2021
06:43 PM
|
2
|
2
|
8039
|
|
POST
|
Hi @ShaneHertzog3 in case you haven't seen it, there's a Community sample available in Survey123 Connect named Water Quality Survey that might provide a good starting point. It's derived from this Water Quality Inspections ArcGIS Solution (now in mature support). Best, Jim
... View more
03-22-2021
06:31 PM
|
1
|
1
|
2309
|
|
POST
|
Hi Nathan, good to hear we're getting there! Note that a few releases back our product name changed from "Survey123 for ArcGIS" to "ArcGIS Survey123" and the name of the install directory was updated accordingly, so it is possible to have an older version and a newer version installed on a desktop machine at the same time. As an example, the old and new install directories for Connect on Windows are as follows: Prior to name change: C:\Users\<username>\Applications\ArcGIS\Survey123ConnectforArcGIS After name change: C:\Users\<username>\Applications\ArcGIS\ArcGISSurvey123Connect More info on installation here. Note that from 3.12 Survey123 supports 'over the top' installations (i.e. without having to uninstall the previous version first). For older versions you must uninstall and then reinstall. Best, Jim
... View more
03-21-2021
07:39 PM
|
0
|
0
|
9398
|
|
POST
|
Hi @NKneisel the strange text that's being displayed for the note question is what I'm seeing when opening this survey in a pre-3.12 version of the field app. Here's how it looks in 3.10 versus 3.12: Also the menu option to update Connect no longer appears in later versions, and the main menu now looks different to what's shown in your screenshot, which suggests you're still running an older version? Just to double-check, could you please confirm the version number in Connect and field app on the About screen? Latest build numbers are field app 3.12.277 and Connect 3.12.232. Best, Jim
... View more
03-21-2021
05:39 PM
|
0
|
2
|
9408
|
|
POST
|
Hi @KelliW The time question type stores the time as a text string in "HH:mm" format. One way to convert this to a string that displays the time in 12-hour format would be to use a combination of if(), int(), substr(), format-date(), and concat() functions to take the hours, subtract 12 if required, and then append "AM" or "PM". Here is an attempt at a calculation (in a text question) using a time question named time1. Note that it might need some testing and refinement! if(int(substr(format-date(${time1},'%h:%M'),0,2)) < 12, concat(format-date(${time1},'%h:%M'),' AM'), concat(int(substr(format-date(${time1},'%h:%M'),0,2))-12,':',format-date(${time1},'%M'),' PM')) The condition checks if the hours are less than 12, in which case make this an AM time; else subtract 12 to get the 12-hour time and add 'PM'. For a dateTime question you could use ${date_time | format:"hh:mm A"} in your report template to show the 12-hour time in the report and disregard the date portion (which is probably simpler, but appreciate you don't wish to use a dateTime question). Check out the Dates and Time in Survey123 blog post for more useful info and examples for working with dates and time. Hope this is useful. Best, Jim
... View more
03-18-2021
09:08 PM
|
3
|
1
|
3493
|
|
POST
|
Hi @hm_stella Just to check, how are records being submitted from Survey123? Are users submitting from the field app using the outbox (i.e. saved to the outbox and then submitted later)? Also is the Monitoring Time question read-only, or is it possible for users to modify it before submit? Does it have a calculation on it? Thanks & best, Jim
... View more
03-18-2021
06:52 PM
|
0
|
1
|
1926
|
|
POST
|
Hi @dgray yes you're spot on - the second if() is the 'value if false' for the first if(). In other words, if Guage_Count does not equal 1 (condition is false), do this other if() statement. The conditions are evaluated in sequence and returns the first 'true' result, so the 'value if false' for the final if() statement will be the result if none of the conditions are true. Each if() must include three arguments. To illustrate the nesting: if(condition, value if true, value if false) if(condition, value if true, if(condition, value if true, value if false)) if(condition, value if true, if(condition, value if true, if(condition, value if true, value if false))) ...and so on. Best, Jim
... View more
03-16-2021
08:26 PM
|
1
|
0
|
4976
|
|
POST
|
PS. Noticed the bind::esri:fieldType is set to esriFieldTypeDouble for the integer questions. If you want these to be integer fields in the feature layer, leave the bind::esri:fieldType column blank and the field type will be set by the question type (in this case, esriFieldTypeInteger).
... View more
03-16-2021
03:36 AM
|
0
|
2
|
4991
|
|
POST
|
Hi @dgray thanks for including your XLSForm, the if() statement is very close! Just need to ensure the parentheses are positioned correctly so that each nested if() is fully enclosed with all three of its arguments, and also that the parentheses around the round() functions are in the right place. Also, an if() statement must contain three arguments: if(condition, value if true, value if false). The 'false' value for the second if() is missing. Your expression could look something like: if(${Gauge_Count} = 1, round((((${Pressure_Test_0h} + ${Pressure_Test_1h} + ${Pressure_Test_2h}) div 3) * 6.89476),0), if(${Gauge_Count} = 2, round((((${Press_Test_High_0h} + ${Press_Test_High_1h} + ${Press_Test_High_2h} + ${Press_Test_Low_0h} + ${Press_Test_Low_1h} + ${Press_Test_Low_2h}) div 6)*6.89476),0), 99999)) I've used 99999 for the final 'false' value, but you could replace this with '' for blank. Hope this helps. Best, Jim
... View more
03-16-2021
03:33 AM
|
1
|
3
|
4992
|
|
POST
|
Hi Nathan, apologies I should've confirmed this earlier but which versions of the Survey123 field app and Connect are you using? Support for the indexed-repeat() and position(..) functions was introduced at 3.12. You can download the latest from app stores and the Survey123 Resources page. Please let me know what version you're on and we can take it from there! Best, Jim
... View more
03-15-2021
09:50 PM
|
0
|
4
|
9454
|
|
POST
|
Hi Leo It looks like your survey could've been created initially in the Survey123 web designer, is that right? This error message can occur if the survey was first published in the web designer (which creates feature layer views) and you then add fields in Connect and attempt to republish. Please see this reply for some useful info on this. Regarding creating assignments, the usual workflow (as described in Josh's blog post) is to create a survey in Connect from the Assignments feature layer that was created as part of the Workforce project. The survey would then be used to create one assignment per submission. Is your aim to have a survey that would create multiple Workforce assignments per submission? For this to work you would need the assignments layer to be a related table, so you could then use a repeat to capture and submit multiple assignments in the form; however, the Assignments feature layer in a Workforce project is the parent layer, so it wouldn't be possible to use a repeat for this layer. I also note from this reply that it's not possible to specify the feature layer for your Workforce project. Would it be feasible in your case to have a separate form for creating assignments? Best, Jim
... View more
03-15-2021
09:08 PM
|
0
|
1
|
2917
|
|
POST
|
Hi @NKneisel thanks for sharing your XLSForm and the additional info. Looks like an interesting project! I'm still not 100% on the objectives for the form so my apologies if I've missed something, but here are a few suggestions that hopefully will assist you with your form design. I've attached an XSLX file demonstrating some of these calculations. The repeat_count sets the number of repeat records to display in the form. The lyr_depth question used in the repeat_count expression is inside the repeat, so when opening this form the repeat is inaccessible (has a null repeat count so zero records are shown). The repeat count uses count-selected(${lyr_dpth}). The lyr_depth question is decimal; however, the count-selected() function works with select_one, select_multiple, and file attachment questions only. Similarly, the selected-at() function used for the lyr_depths note only works with select_multiple questions. To return the index of a repeat, use position(..) on its own inside a repeat. There's a default and a calculation for lyr1depth - this should be one or the other. To return the lyr_depth from the first repeat record, the calculation for this question could be indexed-repeat(${lyr_dpth}, ${lyr_calcs_rpt}, 1). Note that the repeat index number must be 1 or greater (i.e. the first record in a repeat is numbered 1, the second record is 2, and so on). You then don't need the additional calculate question. The required_message is 'yes' for some questions. This column contains the text that is displayed when you submit the form and have not completed a required question. You could set required to 'yes' and then add a required_message, e.g. "You must enter a depth for this question." Note that a required/required_message shouldn't be used on a readonly question because the value cannot be modified by the user. For more info on repeats, please see this blog post and documentation. For more info on functions, please see Formulas. Hope this is useful. Best, Jim
... View more
03-14-2021
08:20 PM
|
0
|
6
|
9473
|
|
POST
|
Hi @RachelBu If you just want to store the 24-hour time as a string, use the format-date() function. For example: format-date(${datetime},'%H:%M') For more examples and useful info, please see this great blog post all about dates and time in Survey123. Hope this helps! Best, Jim
... View more
03-14-2021
06:00 PM
|
1
|
1
|
1442
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-25-2020 06:40 PM | |
| 1 | 08-11-2024 10:11 PM | |
| 1 | 08-04-2019 06:44 PM | |
| 1 | 01-08-2025 03:26 PM | |
| 1 | 06-29-2020 07:21 PM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|