Thursday, February 17, 2011

Hide Current View Dropdown from ribbon


In this post, I am describing that how to hide a dropdown from Sharepoint dialog ribbon where you have an infopath List form with multiple views.

Infopath List forms allows you to develop multiple views of the form.You can switch views depending upon your specific criteria or condition. When you create multiple views, a dropdown appear having the List of Views that you have made in the dialog ribbon i.e. when you initiate that form by adding new item to that list or by editing your existing item in the list, the infopath form will appear in sharepoint dialog in which there is a dropdown name “Current View” on the ribbon. 


Depending upon your scenario, you may want to hide this dropdown from users. So, here is the solution:
Open the form in infopath.
Select Page Design. Now you see the Views section (from where you have created the form views)


Select properties. A form will open with the selected view’s properties.
Uncheck the box labeled “show on the view menu when filling out this form”.


Publish the form and you are done.
Happy Exploring.

Monday, February 14, 2011

Manage Parent Child Relationship with infopath forms in Sharepoint 2010


During the past couple of weeks, I have been searching on how the parent child relationship could be managed in Sharepoint 2010, and have found two references on it:

Mark has explained very briefly how it could be done, but my scenario is a little bit different. Actaully I have infopath list forms and infopath forms does not allow to access Query string parameters of the pages on which they are placed. I have also tried to submit data from infopath 2010 list form to another list using web service (Lists.asmx) but I have failed (I am still need some help on this).
Ok, let’s talk about the solution that how we can get Query string parameter in infopath 2010 form:
  • Sharepoint 2010 have filter webparts that allows you to filter the page content by applying them, so I have use “Query string filter” webpart and set the properties of the Query string filter (Query string Parameter = <your parameter name>) .
  • Filter Webparts could also send the data to different webparts placed on the same page. It can be done by selecting the filter webpart and use “Connections” and send the Query string data to the infopath form webpart. One thing here, in the connection dialog, you would not see lookup columns i.e. if you have made a lookup column which points to the parent List then this column would not be visible in connection dialog, so you have to make a “single line of text” column in the child list and select it in connection dialog. You can hide this field from the List form and from the List Views.
  • Once you get the Query string parameter value in text field, you can copy it to the lookup column by using infopath rules.
Hope this information helps.