Greetings,
I'm facing a problem with a repeat question aggregation and hoping that I can get some help.
The problem is described here as well as in attached word document for more organization:
I made a survey that submits to a custom feature service (SQL server - based) , I have simplified it to only show questions relevant to the problem in question.
The survey collects traffic signal settings within an intersection using four select multiple questions. Each question selects the phase sequence for signal red balls, red arrows , green balls and green arrows. For example, if first phase is a red ball, the P1 check box will be selected at green ball question.
The survey next performs some string operations on the select_multiple questions. It mainly checks if the resultant string contains phase1, phase2, phase3... etc. These checks are done in hidden questions p1 through P4 on xls form (See Attached). Results are summed within the last two questions HeadTotalGreen and ArrowTotalGreen.
Now, on the web app interface, the first repeat selections produce correct results in result box. The problem happens when I add a new repeat:
- Both repeats calculations are reset to zero.
- when the second repeat selections are set, whatever the result is, it gets posted to the first repeat’s results box instead of the second !!!
Here is a test case
1: Set the first repeat with result : 2 , 1
2: Set second repeat with result : 3, 2
3: Check first repeat again: result is incorrectly changed to 3, 2 (as second repeat's result)
It seems that the first repeat takes question values from the last repeat some how !!.
Here's the custom feature service signature:
- OBJECTID ( type: esriFieldTypeOID, alias: ObjectID, editable: false, nullable: false, defaultValue: null, modelName: OBJECTID )
- globalid ( type: esriFieldTypeGlobalID, alias: GlobalID, editable: false, nullable: false, length: 38, defaultValue: null, modelName: globalid )
- HeadFlashRedWays ( type: esriFieldTypeSmallInteger, alias: Head Flash Red Ways, editable: true, nullable: true, defaultValue: null, modelName: head_fl_red_ways )
- HeadFlashYellowWays ( type: esriFieldTypeSmallInteger, alias: Head Flash Yellow Ways, editable: true, nullable: true, defaultValue: null, modelName: head_fl_yellow_ways )
- HeadTotalGreen ( type: esriFieldTypeSmallInteger, alias: Head Total Green, editable: true, nullable: true, defaultValue: null, modelName: head_totalgreen )
- ArrowTotalGreen ( type: esriFieldTypeSmallInteger, alias: Arrow Total Green, editable: true, nullable: true, defaultValue: null, modelName: arrow_totalgreen )
- CRepArrowCountHead ( type: esriFieldTypeSmallInteger, alias: Rep Arrow Count Head, editable: true, nullable: true, defaultValue: null, modelName: c_rep_arrowcount_head )
- parentrowid ( type: esriFieldTypeGUID, alias: Parent Row ID, editable: true, nullable: true, length: 38, defaultValue: null, modelName: parentrowid )
- created_user ( type: esriFieldTypeString, alias: created_user, editable: false, nullable: true, length: 255, defaultValue: null, modelName: created_user )
- created_date ( type: esriFieldTypeDate, alias: created_date, editable: false, nullable: true, length: 8, defaultValue: null, modelName: created_date )
- last_edited_user ( type: esriFieldTypeString, alias: last_edited_user, editable: false, nullable: true, length: 255, defaultValue: null, modelName: last_edited_user )
- last_edited_date ( type: esriFieldTypeDate, alias: last_edited_date, editable: false, nullable: true, length: 8, defaultValue: null, modelName: last_edited_date )
- HeadQuantity ( type: esriFieldTypeSmallInteger, alias: Head Quantity, editable: true, nullable: true, defaultValue: null, modelName: quantity )
=========
The second problem, I'm trying to use HeadGroupCount question to set repeat_count dynamically. whenever I put ${HeadGroupCount} in the repeat’s repeat_count column, trying to fix repeat counts to a value, it gives me an error message telling that the survey is not compatible with feature service and that there is a field that does not exist up there “missing field: 1”.
Thank you for your patience.
Let me know if I can make any clarifications.
Thank you.