Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a question as follows:

I need a SharePoint URL that contain something like this:

http://sharepoint.com/subsite/feedback.aspx?name="Mary Rose"

whereby the URL contain a variable called "Mary Rose".

Once a person click on the URL, it will display a either web-based infopath form or the InfoPath form as follows:

=======================================================
|   Name:     |    Mary Rose                          |
=======================================================
|                                                     |
| Please enter your comments below:                   |
|                                                     |
|                                                     |
|                                                     |
=======================================================

If the URL variable is feedback.aspx?name="Wendy Wonder"

It will display the name accordingly.

Anyone know how should I go about it?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Here we go : http://blogs.msdn.com/b/infopath/archive/2010/06/03/how-to-pass-querystring-data-into-an-infopath-form.aspx

share|improve this answer
    
Thanks Fox, however, I do not have the InfoPath Form Web part. I only have the Query String (URL) Filter web part. Is this because that I am using SharePoint 2007? also, is it possible to pass it to a client version InfoPath? (meaning that the InfoPath form is open in the InfoPath client which is install at the client side) –  Jack Mar 5 '12 at 9:23
    
Hi Jack. Before continuing. Let me ask this. Why do you need to pass parameters/variables in Query string parameters. InfoPath has multiple ways to query data sources based on parameters. Also, Infopath can detect the currently logged in user. Explain to me the relevance of the name variable. –  Fox Mar 5 '12 at 11:19
    
Thanks Fox, let me quote you a example: suppose a requester submit a purchase order (the requester can define who is the receiver of this order). After the purchase order is submitted, the receiver will execute the order inside the purchase order. A email will be sent to the requester to check if the order is executed and require the requester to submit a feedback. The email need to include the name of the receiver, otherwise, the feedback will be incorrectly. The feedback is from another site, differ from the purchase order site. Any suggestions is appreciated. –  Jack Mar 6 '12 at 0:56
    
Hi Jack. I've added another answer. –  Fox Mar 6 '12 at 5:58

Are you using Sharepoint workflow to accomplish the logical flow of the form? If so, you could use User fields to establish where the email needs to go to and also promote the "Requestor" and "Receiver" users as sharepoint fields (within the list).

So in other words, the workflow will work as follow:

  1. Upon initial creation of the form, the requestor selects a receiver (using a people picker). The receiver and requester names are saved as form fields within infopath.(and subsequently also saved to sharepiont list so that the workflow can use it)

  2. Email gets sent to receiver. Receiver opens and approves/declines the form.

  3. Email goes back to Requestor who will then review and add comments (data also saved in form and sharepoint list)

  4. End Workflow.

In your scenario, you really do not need to use Query String Parameters. The actual variables (user names etc.) can all be saved within the form.

I suggest you look at this example which shows off a lof ot features within Infopath and workflow in Sharepoint: http://sharepointmagazine.net/articles/a-tribute-to-the-humble-leave-form

The above example also uses Requestor and Approvers

share|improve this answer
    
Thanks Fox, I do appreciate your answers and suggestion. I am going to upvote both your answer. However, I was wondering if there is a solution for my question as I could not find the InfoPath Form Web part. I only have the Query String (URL) Filter web part. Is this because that I am using SharePoint 2007? also, is it possible to pass it to a client version InfoPath? (meaning that the InfoPath form is open in the InfoPath client which is install at the client side) –  Jack Mar 7 '12 at 1:16
    
Hi Jack. As far as I can remember, the Infopath Forms web part is a SP 2010 feature. You cannot pass Query string Parameters to a form opened in the client. I haven't seen any feature which allows you to consume/read the Query string variables. –  Fox Mar 7 '12 at 10:39
    
Thanks Fox, probably I would say that if one need to have a SharePoint URL pointing to a InfoPath with variable in the URL, one need to use SharePoint 2010 as it contain this feature. In that case I mark your first answer as correct. Your 2nd answer will be for those who need workaround if they are not using SharePoint 2010 –  Jack Mar 8 '12 at 3:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.