Link 2 forms together so I can access the data from the first form in the second form - InfoPath Dev
in

InfoPath Dev

Link 2 forms together so I can access the data from the first form in the second form

Last post 03-04-2013 11:16 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-15-2013 08:40 PM

    Link 2 forms together so I can access the data from the first form in the second form

    I have an InfoPath 2010 form that I use as a project brief.  The project brief has information such as budget, region etc.  This form is published to a Sharepoint 2010 library and I have about 20 forms completed.

    I have a second infopath form that is a Project Status report.  I need a second form because there are multiple status reports (ie weekly) for each project brief.

    I have a drop down box at the top of the status report to select which project the report is for.  The List box is linked to the first sharepoint library and presents a list of the projects that are in the first library - that is working well. I also have a hyperlink in the status report that opens the source project brief document (using concatenation of the project brief name from the combo box to create the URL).

     What I want to do now is bring in some data from the project brief so the user doesn't have to retype it.  eg I have budget in the project brief and also in the status report.  I would like the budget field in the status report to be accessed directly from the project brief somehow.  I don't know how to do this.  I know I can reference the right project brief because I have the list box and the hyperlink working.

     I would appreciate any help.

    Matt

     

  • 02-17-2013 11:55 AM In reply to

    Re: Link 2 forms together so I can access the data from the first form in the second form

    Hi Matt,

    Go to your Project Brief form and promote the fields that you want to bring into your Project Status form.  This is just File->Properties->Promoted columns. Then, go back to our Project Status form and modify the data connection to include those columns. Now, when they select a dropdown item add a rule (or a button labeled copy with a rule) that sets the fields you want to copy into. You'll have one set field action for each field. 

    If you want to copy repeating data, I recommend looking at the qRules Insert command which will allow you to insert a number of repeating rows or sections based on the destination source. It also has a CopyTable command if the schemas match, and it even has an XSLT Transform command that is even more powerful.

    Thanks,

    Patrick

    Patrick Halstead
    Project Manager at Qdabra
  • 02-17-2013 02:08 PM In reply to

    Re: Link 2 forms together so I can access the data from the first form in the second form

    Patrick

     If I do this, wont it give me access to "all data" in the library, not just the data from the actual project brief that links to the specific project report?

  • 02-17-2013 02:32 PM In reply to

    Re: Link 2 forms together so I can access the data from the first form in the second form

    OK worked out what I think I need to do.  This is what I did.

    1. I promoted the fields in my project brief.
    2. I created a new data provider in my status report that links to the project brief library including the Capex budget field.
    3. I created a button with an Action "set field value". I selected the field from the data provider and set a "filter" with the rule. "projectName" from the brief = "projectName" from the status report (which I know are identical because the have the same data source.
    4. I loaded it into Sharepoint and clicked the button - nothing happened.

    Any ideas what I have done wrong?

     

  • 02-17-2013 05:36 PM In reply to

    Re: Link 2 forms together so I can access the data from the first form in the second form

    Is your data source set to query on load? Can you temporarily drag the secondary data source onto the form so you can see the returned values? Drag your main data source field onto the form again too (if you are using a drop down for it) so you can verify that you have an exact match.

    Hilary Stoupa

  • 03-01-2013 10:04 PM In reply to

    Re: Link 2 forms together so I can access the data from the first form in the second form

    Thanks to you both for your replies.  I did what Hilary suggested and I have a better understanding now of how it works - but I still don't have a full understanding and not sure what to do next.

    I created a new view for R&D.  I dragged the data fields to the new page as a repeating table.  When I load the form, the table populates with all the data - great.

    I then dragged one of the query fields to the form, added a button to "query data".  Now when I enter data in the field and click the button, the repeating table beneath only brings back matches - also great.  (strange though, I have to click the button twice each time for it to work).

    So I know my connections are working.  Now I want to put a single textbox on my form, run a query to my data source, and retun a single value into that text box.  But I can't work out what to do.  I was thinking of bringing in the query field as a text box and set its default value to be the value in my active form (which is the project name).  But I can't add a default value (it is greyed out).

     I'm not really sure what to do next.  Please help if you can.

  • 03-01-2013 10:26 PM In reply to

    Re: Link 2 forms together so I can access the data from the first form in the second form

    I have made good progress by reading other threads.  I now have got the query working using events (change event on a check box).  The user selects the "capex funded" checkbox.  I have 3 actions on the change event.  1, set the query field to the name of the project, query the data source and then set the local capex field with the returned value. 

     

    Is there a way to run a number of actions like this without a button or a change event (ie on form load)?

  • 03-04-2013 11:16 AM In reply to

    Re: Link 2 forms together so I can access the data from the first form in the second form

    Sure, you can set Form Load rules.
    Hilary Stoupa

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