Ive done a lot of work trying to figure out how to write this nest if then, or and statement to use in my calculate field of my survey. Essentially this field is to calculate a risk rating of a culvert based on answers to questions in the survey so I can automate this without having to do it all at the end of the season. Maybe there is an easier way to do this as well. Im going to attach a notepad file of one of my many attempts to get this correct. Any help is appreciated. Ive looked at a lot of documents and other community responses but just cant seem to get into this type of depth.
IF( ) statements have 3 components, no exceptions:
IF([logical test],[value if true],[value if false])
TIP: When working with IF() statements in Survey123 Connect, you can trick Excel into helping you write them. If you add "=" to the front of your IF() statement, Excel will give you 1) colour-coded formatting for brackets (it sometimes disappears though), and 2) when you mouse over a bracket it will highlight the matching bracket (if any).
Looking at your IF() statement, you have some incorrect formatting. For example:
if(${Ponding_Overflow}, 'Yes' and ${Channel_Alignment},
Nesting IF() statements is just a regular IF() statement with extra steps. When it comes to very complex nested IF() statements, I usually write them out and then fill in the blanks to ensure I don't miss anything. E.g.,
if(111,222,if(111,222,if(111,222,if(111,222,if(111,222,if(111,222,3333))))))