Showing posts with label InfoPath. Show all posts
Showing posts with label InfoPath. Show all posts

Thursday, February 11, 2016

How to set InfoPath field value on dropdown change event in SharePoint 2010 and 2013

Problem

We have a Dropdown in InfoPath which is populated from external data source (SharePoint List. e.g. TimeSheet List having fields ProjectName, %Complete and Type. Dropdown is showing Project Names). We want to populate infopath field (Type) from SharePoint based on selected Project in dropdown.

Solution

I suppose you have already Filled Dropdown from Timesheet List and or applied filtering if required, If not, you can follow my post How to Filter Infopath Dropdown.

Select the Project dropdown that we created in previous article and from the "Home" ribbon, select Add Rule->This Field Changes -> Set a Field's Value option as shown in the below image.

How to Populate and Filter InfoPath Dropdown Populating from SharePoint List

Problem

We have TimeSheet SharePoint List which has information of all the projects, their status and % Complete. We want to populate dropdown with TimeSheet projects whose status is not closed.

Solution

Populating Dropdown

First Create the List as following,


Now in the InfoPath Designer (It does not matter if it is list template or designing new InfoPath document), Add dropdown list from menu bar,

Sunday, September 28, 2014

Opening InfoPath Form in Modal Dialog

Question 


How to open InfoPath New and Edit forms in the Modal dialog?


Answer


Let us start with new fresh InfoPath Library. Create an InfoPath Library and call it "AccordionForms". The path of library would be like,


Let us examine new and edit form URLs.


New InfoPath Form:


If you click on the new item link, it would redirect to URL,


Wednesday, September 24, 2014

Create Info Path Accordion (Show Hide Section)

Previously i worked on the project which used InfoPath form. The Form had many sections and each section had scrolling and lot of data. I needed to introduce accordion in the form. I needed to add buttons to show hide any section of the form so that user can focus on what is required. InfoPath is different than the normal JQuery accordion where you can hide or show any thing based on script or just CSS. In InfoPath you need to add behavior and Rules for each button and section which we want to hide or we want to use as changing behavior or variable. Following is the how i achieved it,
1- First thing first, add two picture buttons (Having up and down pictures).  

2- Add Boolean variable ESShow and set its default value as 0 if you want to hide section when InfoPath form loads otherwise set its default value 1.


Display Parent web InfoPath form in child web InfoPath Form Web part

Problem

Yesterday i faced an issue while displaying Info Path form in the web part. My task was to show the Info Path form in the child web but actual Info Path library was on the parent web. The problem was when i tried to edit the Info Path web part, i could not see the list of Info Path library (from parent web) because it was showing only current site Info Path libraries.

Solution

I added new page in Page/Site Pages library of parent website. I added Info Path web part in the page and copied the Page from parent web to child web. Every thing worked fine in the child web Info Path web part page.

Copy Page to Child Site