I have a survey where I only want users to add data within a repeat but still view the original data in the parent form when revisiting the survey via the Inbox. I figured this could be done with a note summarizing the parent form while hiding all of the question on the parent form. I am have some difficulty coming up with a relevant statement that can accomplish this. I was thinking it could be done using dates I have a date field: originalSurveyDate calculated to once(today())
I was thinking that I could set the relevant expression for the fields I want to show initially to ${originalSurveyDate} = today()
and the relevant for the note that I want to appear on revisit from the inbox to ${originalSurveyDate} != today() or ${originalSurveyDate} < today(), however neither of these work. Any thoughts on solutions to my conundrum would be greatly appreciated.
Solved! Go to Solution.
Hi Brent,
You should be able to make a comparison on the date fairly easily; today() should be comparable to a previous date. Alternatively, you could use format-date() and compare m/d/y strings.
Hi Brent,
To display data in an editing workflow, you can set questions to be read only.
Hi James,
Thanks for the reply. Unfortunately setting questions to read only won't work with the workflow I am trying to set up. Basically I want to expose all questions in the parent from for editing the first time a form is submitted and then only questions within a repeat for editing when the form is opened again through the inbox. I also have values for some questions set to NULL which come back blank in the Inbox, I am trying to hide these questions when the form is opened for editing from the Inbox so they don't confuse the data collectors.
I would also like to show a summary of the answers from the parent form. My thought is to concatenate them in a Note.
I think I can accomplish my goal using a relevant expression but I am having troubles coming up with the proper syntax.
Is there a way to write a relevant expression that would do the following
display the question if the start (date) is the same as today()
and a second expression
display question/note if the Start (date) was before today()?
Better yet, is there some sort counter that can determine how many times the from has been edited from the inbox?
I have accomplished similar workflows in past using two forms, first creating a master form with all fields and then creating separate forms for both the initial survey and one for return visits (which can only be edited through the inbox) all going to the same submission URL. However, at the request of my users I am really trying to avoid having to use two forms in this work flow.
Thanks!
Hi Brent,
You should be able to make a comparison on the date fairly easily; today() should be comparable to a previous date. Alternatively, you could use format-date() and compare m/d/y strings.
Thanks James, That did the trick.