In a nutshell, I created a Survey123 for requesting a certain permit. If the resident requests a start date between X and Y, their permit will be for 21 days. If they request a start date between Y and Z, their permit will end on June 1 specifically. Since in some cases the End Date is calculated based on the Start Date while in other situations it's a set rule of June 1, the only way I know to set that up in Survey123 is to have 3 questions, as laid out below.
Question1: Start Date (user can input any date within a given date range, set as a constraint)
Question2: End Date (visible only if Start Date is within a given date sub-range, set as a constraint) = Start Date + 21
Question3: End Date May (visible only if Start Date is within a different given date sub-range, set as a constraint) = June 1
Because the overall end date of the permit is therefore sometimes in one field and sometimes in the other, I'd really like to know if:
- There is any work-around within Survey123 to build out constraints and calculations to meet both requirements. This would be especially useful since a staff member may need to adjust the start date in the resulting web map and therefore also update the end date, and it would be a heck of a lot easier for them if there weren't multiple "end date" fields.
OR
- Define a variable in Arcade (in AGO for symbolizing) that consolidates the two into one, such as "if End Date is empty, put End Date May, else put End Date".
There will only ever be data in ONE of the two fields, not both, and never will they both be empty.
However, I can't find any documentation that mentions using IF or IsEmpty when defining a new variable.
Ultimately, I am setting symbology colors based on the permit's approval status plus the dates. (Approved & In Progress, Approved & Future, Approved & Expired, Denied, and Under Review) I can work around all of this by just listing out all combinations individually with || for OR to check both end date fields but as mentioned before, if staff go in and update the dates, I don't want them to feel confused as to which field to mess with.
Pic below of the resulting data after filling out some pretend survey submissions.
