Require photo in survey that also could be updated via inbox

407
2
06-10-2019 03:28 PM
JakeJacobs
Occasional Contributor III

I want to be able to require a photo is taken in my survey.  I also want to be able to update an existing survey using the inbox after the survey has been submitted the first time.  However, attachments aren't brought along or able to be added from the inbox, so if the field is required, I am unable to submit an updated survey.

I'm looking for ideas for validation where I could recognize the condition of a survey being edited rather than created and only require a photo on creation, or somehow recognize how many attachments there are already associated with the feature using pulldata or something like that.

0 Kudos
2 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Erika,

There isn't direct access to whether the survey is loaded from the Inbox or not at this time.  

Depending on when the update process takes place, you might be able to create a check to see if this is a new or edited survey.  One way would be to have a hidden question with a calculation of 'today()' - that would store the day the form was created.  You could then compare it with the current date as a function in the required field; if the initial date is not today, then do not make it required.  See teh attached sample

0 Kudos
JakeJacobs
Occasional Contributor III

This didn't work for me since the users tend to want to edit their surveys fairly soon after they first submit it, and I couldn't think of a "safe" timeframe to mark off for the required part. 

We ended up just not making the photos required, which is unfortunate but not very risky.

0 Kudos