Using GetInputParameter with same Library and Repeating tables - InfoPath Dev
in

InfoPath Dev

Using GetInputParameter with same Library and Repeating tables

Last post 07-27-2013 04:43 PM by Patrick Halstead. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-02-2013 12:18 PM

    Using GetInputParameter with same Library and Repeating tables

    I have a form that I would like to use GetInputParameter to pass data from some of the fields into another newly created form in the same library. 
    My questions are:

    1. Can you use GetInputParameter to create a new form in the same library as the source form?
    2. Can GetInputParameter pass data from repeating tables into repeating tables in the new form?
    3. Can you dynamically specify what gets passed?  For example, what if the end user checks a checkbox next to each row in the repeating table that they wanted to copy into the new form?

    As always, thanks for your help.

    Filed under:
  • 07-02-2013 06:34 PM In reply to

    Re: Using GetInputParameter with same Library and Repeating tables

    Hi - GetInputParameter would be used in the target form you are opening. I can't really think of a way to use it for copying values into a new form. I think I would instead:

    1. Submit the form the user has open, so that the items they have checked are saved
    2. Open the new form, passing in an input parameter that has the ID or URL of the form saved in step one
    3. In the new form, get the input parameter and execute a query for the form from step 1
    4. Use other qRules commands to copy in the repeating table values

    Is this a filler form or a browser form?

    Hilary Stoupa

  • 07-03-2013 05:49 AM In reply to

    Re: Using GetInputParameter with same Library and Repeating tables

    Hi Hilary, Thank you for your response.

    I have some further questions.  You say "I can't really think of a way to use it [GetInputParameter] for copying values into a new form" but isn't that what it is used for?  The example instructions provided on your site use it to copy the person's name and their travel purpose from the Travel Request Form into a newly generated Expense Form by clicking a button. I would like to do the same thing, except that my new form would be in the same library and the data I would be passing is in repeating tables. 

    How would I open the new form and pass the input parameter with the ID or URL of the form I want to copy?  How would I specify which form using the query?

    What other qRules commands can copy repeating table values from one form to another? 

    Thank you.

  • 07-03-2013 07:42 AM In reply to

    Re: Using GetInputParameter with same Library and Repeating tables

     I meant to say "copying repeating values" not just copying values.

    I asked about filler vs. browser because if you are using filler you could try the OpenForm command.

    I'm assuming when you save your form, you know the name of it? That is what I am suggesting you pass to your new form, so you know what current form the new form was opened from.

    qRules has CopyTable that can copy repeating data - so if you created a data connection to an XML of the same type, you could use ChangeConnectionUrl to modify that to open the correct form, query to get the data, then use CopyTable (or Insert with other rules, or Transform) to get the data into your target form.

    Hilary Stoupa

  • 07-03-2013 07:51 AM In reply to

    Re: Using GetInputParameter with same Library and Repeating tables

    Sorry, I forgot to answer your question about filler or browser.  It is indeed a filler form.

    You've provided a lot of new commands I am not familiar with yet so I will do some research/testing and see how I can use them for my situation. 

    Thank you for pointing me in the right direction!

  • 07-10-2013 05:45 AM In reply to

    Re: Using GetInputParameter with same Library and Repeating tables

    This is probably a silly question, but how do I obtain the link to that particular form?  I have searched for several hours and can't seem to find this anywhere. 
  • 07-13-2013 02:31 PM In reply to

    Re: Using GetInputParameter with same Library and Repeating tables

    Hi Deeayrian,

    It's the URL for the target form. You will probably need to make it part of your concat function. For example, in the source form: concat("http://site/library/form/template.xsn&ID=",ID), where ID is a field in your form that you will be using for the input parameter.

    You can get the URL for your site (assuming it's same for source and target) using an xpath command:

    substring-before(substring-after(/processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'href="'), "/Forms")

    Patrick Halstead
    Project Manager at Qdabra
  • 07-25-2013 12:48 PM In reply to

    Re: Using GetInputParameter with same Library and Repeating tables

    Thanks to the help of you two and some other sites, I was able to successfully create form 2 via a button on form 1 using the open form command and adding the form's name as a parameter to the end of it.  Then I could successfully copy over specified fields from form 1 into form 2 via a button that ran a query.   Thank you so much for your assistance with all of that!

     Now I am stuck because some of the fields that I am copying over are values from drop down lists.  It appears you can't assign a value to a drop down list field, even though that value exists as an option in the list.  Can you confirm if this is true?  Do you know of any ways I can get this to work. 

    Thank you!

  • 07-27-2013 04:43 PM In reply to

    Re: Using GetInputParameter with same Library and Repeating tables

    If the dropdown is bound to a field in your main data source, you should be able to just set that field and the dropdown should show it. You may also want to use IDs that are different from the display strings) for your dropdown for unique selection and long term maintenance.

    Did you end up using an input parameter for your form? How are you specifying which form to load?

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.