locked
Populating an infopath form from data in another inforpath form RRS feed

  • Question

  • Hello,

    I have two infopath forms:

    - General Links

    - Detailed Links

    When clicking on an hyperlink of the General Links form I display the Detailed Links form asscoiated with the selection.

    I have two issues for now:

    - the save button does not appear on the detailed links form even the save is checked in the properties.

    - from the data entered in the detailed form I would like to fill or deny the check on the general link.

    ... e.g.: on the detaile form if I have 3 check box they need to be filled all 3 before the check on the general link is allowed or automatically done.

    ANy idea?

    Thanks,

    Dom


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    Tuesday, October 9, 2012 12:24 AM

Answers

  • Hi Felyjos,

    For the first problem, please check if the “Save” command is checked to show on the form in Form Options > Web Browser Category.

    And here is a solution for your second problem. We can pass the selections from query string to Detailed Form and use the parameters get from query string. Then use formatting rules and validation rules to hide those sections which its related option has not selected in General Form and also make sure there must be a value in those controls which its related options has checked in General Form.

      • Designer Detailed Form and publish a field as SharePoint Web Part connection parameters so that we can pass query string to this field. Add Field1, we will use it to receiver parameter from query string.
      • Add Detailed Form to display on a web part page. And add Query String Filter Web Part also on the page, use it to get “choice” query string from URL. And make connection between these 2 web part.
      • Let’s suppose the web part page URL is “http://server/site/page library/page.aspx?choice=010”. When option is checked on General Form, we will pass 1 to the URL and when it is uncheck, pass 0. So we can already get selected option in Field1.
      • Next step is to control the visibility and validation for related controls with rules, so continue to custom Detailed Form.
        Add another 3 Fields: Field2 (default value: substring(field1, 1, 1)), Field3 (default value: substring(field4, 2, 1)) and Field4 (default value: substring(field4, 3, 1)). We can already get “0”,”1”,”0” separately in Field2, Field3 and Field4.
        Put all controls related to choice1 to Section1, controls related to choice2 to Section2 and controls related to choice3 to Section3.
        Add formatting rule on Section1: If Field2 = 0, hide this control.
        Add formatting rule on Section2: If Field3 = 0, hide this control.
        Add formatting rule on Section3: If Field4 = 0, hide this control.
        Add validation rule on controls in Section1: If Field2 = 1, Show screentip: “Cann’t be blank”.
        Add validation rule on controls in Section2: If Field3 = 1, Show screentip: “Cann’t be blank”.
        Add validation rule on controls in Section3: If Field4 = 1, Show screentip: “Cann’t be blank”.
        Publish Detailed form.
      • Custom General Form.
        Go to your check box properties, set value when cleared to “0” and when checked to “1”.

    Add a field to compose page URL with query string. Set default value to this field
    concat("http://server/site/page
    library/page.aspx?choice=", checkbox1, checkbox2, checkbox3)

    6. Insert a hyperlink and select the field we created in above step as its Data source.

    7.Done. Now query string is passed from the hyperlink to the web part page. And we can get selections from general form and hide/validation related controls on Detailed Form.

    Let me know if you have any problem.

    Thanks & Regards,
    Emir Liu
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contact tnmff@microsoft.com


    Emir Liu

    TechNet Community Support


    • Edited by Emir Liu Wednesday, October 10, 2012 6:40 AM
    • Marked as answer by Emir Liu Thursday, October 18, 2012 2:45 AM
    Wednesday, October 10, 2012 6:32 AM