Hi,
I'm creating a Scavenger Hunt for Collector use and want to be able to quickly grade the results in a Dashboard on ArcGIS Online. Contestants will be supplied a guide with question IDs and multiple choice answers. They will select the question ID and their multiple choice answer for each feature they record.
I have all of the features, fields and domains created along with some test answers. I'm trying to use the calculate value function for a hosted feature service in ArcGIS Online to add a "Y" or "N" value to a new 'Corrected' field to indicate if they got they answer right or wrong. (This field will be hidden from them in the Collector web map)
My logic is that I want any collected feature (row) whose QuestionID == "1" AND MultChoice == "A" to get a "Y" assigned to the new 'Corrected' field. I will list all of the correct combinations of Question IDs and Multiple Choice answers in this manner. Else, all other values will be assigned "N".
I've been experimenting with the Arcade Expression builder box in ArcGIS Online, but it seems to be lacking in its syntax troubleshooting capabilities and I'm not getting anywhere. It doesn't seem I can evaluate a compound expression. I'm thinking I need to create a variable based on a filter (the easiest way would be all questions with Multiple Choice == "A" become variable 'MultiA', "B" becomes 'MultiB", etc.), and then evaluate an IIF statement for each of those variables.
Any Arcade wizards out there care to enlighten me?