I am building a job application submission app for an organization. I have a gallery where currently posted jobs are viewable according to the open and close dates of each job. The employee clicks on an "Apply" button found on the job announcement, which takes them to the application form (EditForm_Application) . They fill out the form and submit. Then, they have an option to review their application and make changes as long as the job posting is still open. I want to set the DisplayMode of the submitted application to DisplayMode.View ONLY during the time the job is posted.
The logic, in my mind, should be as simple as something like this:
//CloseDate = Date Field (SharePoint Column)
If(DateDiff(CloseDate,Now(),Days) < 0,Edit,View)
However, that doesn't work. I've tried to convert the DateDiff value to a number, then assign to a variable, then run an IF statement comparing the variable to zero, but that doesn't work either. Lil' help!