Required Field - Can NOT use "Cannot Be Blank" setting - InfoPath Dev
in

InfoPath Dev

Required Field - Can NOT use "Cannot Be Blank" setting

Last post 12-31-2018 08:00 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-21-2018 10:29 AM

    Required Field - Can NOT use "Cannot Be Blank" setting

    Sorry in advance but I've searched and I can't seem to find anything but this has got to be a simple answer. I have created three views for three different users (Requestor, Approver, Processor). I want to make some fields on the Approver form required. Also, I want to make some fields on the Processor form required as well. The Processor form will have all the fields. The Requestor form has a subset of the fields. I can't add a validation rule to the Submit button. I need suggestions on how to add a validation rule, I assume, that runs when the person clicks on submit. Open to other alternatives as I am new to this. Thanks in advance.
  • 12-21-2018 11:24 AM In reply to

    Re: Required Field - Can NOT use "Cannot Be Blank" setting

     Hi! Ok, so you have some options here. I generally have a status field in my form (you don't have to show it on the form, just have it in the data source) - and you'll need that for either of these approaches.

    To use custom validation rules:
    When the Requester submits, set the status to "Requested" (or whatever makes sense to you). Add a form load rule (under the data tab on the ribbon) that when the form's status = Requested, set form status to Approval In Process (or whatever makes sense to you...) Next, on the fields that are required for the Approver view, you can use validation rules - and set those rules to things like "FieldA is blank and FormStatus = Approval In Process" the field is required. The reason we have to change the status on load is that if you set the status to Requested, and your validation rules use that status, you won't be able to submit - so set a placeholder status, then leverage that in Form Load to set a status for this "session" - then you can use that status + validation rules, which gives you all the goodness of built in validation. Same for the next step - approver submits, status is set to Approved, when opened the next time, status get set to... I dunno, Processing In Process or whatever, and your validation rules for those fields use that status.

    To just block submit:
    When the Requester submits, set the status to "Requested". In the Approver view, disable the submit button if the status = Requested and the fields you want filled out are blank. Then they have to fill in the fields to click the button. When they submit from the approval view, set the status to Approved and so on.

    You'll need to use submit rules to set a field's value prior to submitting - those are under the submit options. 

    Hilary Stoupa

  • 12-24-2018 08:16 AM In reply to

    Re: Required Field - Can NOT use "Cannot Be Blank" setting

    Hi Hilary: Thank you for your reply. :-) So I've been playing around. What if I have three forms (Request, Approval and Processing form) and I need fields on the processing form to be required as well. I noticed that the form load is for the form and not associated with the views. In other words, when I change my views the same form load is used for all three views. I tried setting the status field to Processing after the Submit button was click but that doesn't seem to work.
  • 12-31-2018 08:00 AM In reply to

    Re: Required Field - Can NOT use "Cannot Be Blank" setting

    You have three different forms? Or different views in the same form? Can you attach your template to a reply under the options tab so I can take a look?
    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.