How To Validate that a Multimedia Question Captures an Image

Overview

For multimedia questions, not enabling the ‘allow no answer’ property do not ensure that an image will be captured.

 

If you would like to validate that at least one image will be captured in a multimedia question you can use a validation rule and a global variable that will check the amount of attachments captured in the interview when you enter the question.

Step one: Define the global variable at the start script of the question:

 1.png

Step two: Add the validation rule:

 2.png

You can also modify the validation rule to match other types of validations regarding the amount of attachments captured in a multimedia question, for example you can validate that no more than x amount of attachments are captured -  GetAttachedFiles().length > Vars["AttachmentsAmount"]+2 && !Answered(CurrQues)

 

Please Note: you should test this script on an android device or PC Surveyor, It will not work on the emulator as you cannot capture/add attachments on the emulator.

 

That’s it!

Visit us at: http://www.dooblo.net

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.