InfoPath form load rule is not checking all the rows in form library

Hi,

Requirement:

We have a form library named "HR Annual Review". In the InfoPath form we have two buttons "Save" and "Submit". User is allowed to Save multiple times and only once using Submit button. The file name of form library "HR Annual Review" will be stored in the format <username>+<mm>+<dd>+<yy>.xml. Say for example, an user named Mike Walt submitted a form then the file name will be as MikeWalt012314.xml. If the same user (Mike Walt) submits the form and tries to open the form for subsequent edit, then we need to show a view which has an error info saying The Appraisal is already submitted for the current appraisal cycle.

Solution we tried:

To achieve the above requirement, we tried using InfoPath Form Load and add a rule to check whether the combination of current user name and the year already exists in the filename column of the form library. But the rule we applied is not checking all the rows in the form library. The rule is always checking the first row of the form library.

What we need:

We need the validation using InfoPath rule or some other way/solution to check whether the combination of current login username and current year file already exists in the form library.

Thanks in ad

January 22nd, 2014 7:14pm

Hi Srivignesh,

Submit button Uses the Main Data connection to submit the data to the list. This is what you are using and naming the file in the format. You can create secondary data submit that will update the exiting item in the list. With this, you don't have to create any rules to check all the rows which is also not possible in OOB InfoPath.

Once you have the two data connection, hide the toolbar from the form and display these two on the button. For The Submit button, apply the rule to hide the button if created by is not empty. For Save button, apply the rule to hide the button if Created By is empty. This way, when a new form is created, you will see the Submit button, and when the user have to update the form, they will see Save button. Hope it help.s

Free Windows Admin Tool Kit Click here and download it now
January 22nd, 2014 10:05pm

Kapil,

I don't want to show/hide the Save or Submit. Instead we need to always show both Save and Submit button but if the user submitted the form and the same user tries to open the submitted form for subsequent edit then we need to tell the user an error message saying the "The Appraisal is already submitted for the current appraisal cycle." instead of showing the user the entire form for edit.

I have updated the post which is I think my requirement will me more clear for understanding.

January 23rd, 2014 9:24am

Good luck. Were you able to solve this?

Free Windows Admin Tool Kit Click here and download it now
January 24th, 2014 4:01pm

Hi Kapil,

Still we were not able to validate on Save/Submit.

February 5th, 2014 6:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics