SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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";

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 basied

share|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";
share|improve this answer

Your Answer


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.