AnsweredAssumed Answered

Question on script to go back to previous record if user didn't submit

Question asked by terrypink on Jul 23, 2014
Latest reply on Jul 23, 2014 by philmodjunk

Title

Question on script to go back to previous record if user didn't submit

Post

     Hi Phil,

     Wondered if you could help me with this question?  I have created a layout that leads to a series of diary questions.  Previously, I had created a script where every time the user logs into the opening menu, they get a new record.  However, the PI is saying that they would  would like it to only get a new record if they press submit, otherwise, if the person is only halfway done and then exits out of the application, then the next time they log in, their previous record would be there waiting for them, and they would also get a dialog box saying that they need to finish their submission.  I’ve been trying, but to no success.  Could you take a look at the screenshot?

      

      

     The problem is that I can’t use the “Set Field [DailyDiary::fkBEAMStudyID; Get (AccountName)]” code until after a “New Record/Request” line, otherwise it doesn’t work (nothing seems to get populated into the DailyDiary::fkBEAMStudyID field).  I tried “Go to Field” instead, but that didn’t seem to work.  Without linking the DailyDiary::fkBEAMStudyID field to the AccountName, it just pulls up the last record of the last user that logged in, not the user that logged in this time.

2.JPG

Outcomes