Send data to Form Library with diferent views and mandatory fields in each view - InfoPath Dev
in

InfoPath Dev

Send data to Form Library with diferent views and mandatory fields in each view

Last post 07-02-2009 06:53 AM by warrtalon. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-02-2009 06:38 AM

    • hdelav
    • Not Ranked
    • Joined on 03-18-2009
    • Brazil
    • Posts 1

    Send data to Form Library with diferent views and mandatory fields in each view

    Hi there. After all, sorry about english errors, if have someone.

    I build one form to use InfoPath Form Services in SharePoint and this form has 2 diferent views. The views are changed by "status" field, that change automaticaly when i press send button in each view.

    My problem is when i put diferents fields in diferent views with option "Cannot be blank" in field property, i can't send the form to the library, because fields in another view need to be completed to send data.

    So i need to maintain fiels with options "Cannot be blank" in each view and able to send to library anyway.

    can somebody help me?

     thanks in advance.

  • 07-02-2009 06:53 AM In reply to

    Re: Send data to Form Library with diferent views and mandatory fields in each view

    If you make the field required, then it doesn't matter which view it is in - it cannot be blank ever.  It is not a good idea to use this setting if you have fields that can't be filled out until later in time.  To get around this, you need to use data validation on the fields in the 2nd view and some sort of hidden check field in view 1.  Basically, you put data validation on the required fields that say "If CheckField = True and Field is blank, display error."  This way, it won't be required until that check field is set to True.  To set that check field,  you have to add a rule at Tools > Form Options > Open and Save, and add a rule with a condition that checks the Status field (this should change after first button is pushed) and sends the user to the proper view depending on the status.  If the status is advanced for view 2, then this is when you set the check field to True (or whatever).  This puts the user on view 2 and makes the fields required.

    Rule

    -Condition: If Status = 2

    -Actions: Set Field's Value (Check Field = true())

                  Switch view to view 2

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