I currently open infopath files save in a SharePoint library through a webpart.

The user can enter the the file name in a textbox and click a button and the file will open.

The URL is like:

http://servername/_layouts/FormServer.aspx?XmlLocation=/InstrumentsLib/" + fileName + "&Source=http://b1544:8080/InstrumentsLib/Forms/AllItems.aspx&DefaultItemOpen=1";`m

Right now the web part works fine, but I want the infopath file to open in a specific view, the infopath template has 2 views.

I want the file to open in the 2nd view.

How can I do this?

The form is web based.

| improve this question | | | | |
  • You already asked this. I am redirecting your old question to this one, but in future please could you edit your original question rather than asking a new one. Thanks.[mod] – SPDoctor Mar 22 '13 at 19:00

Found a way.

http://servername/_layouts/FormServer.aspx?XmlLocation=/InstrumentsLib/" + fileName + "&Source=http://b1544:8080/InstrumentsLib/Forms/AllItems.aspx**&DefaultView=viewname**&DefaultItemOpen=1";
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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