How to change the type of infopath form received through "Get Form From" connection of web parts?
-
יום שישי 22 יוני 2012 13:43
On my webpage at run-time my Infopath 2010 Form web part receives the edit fOrm fRom a connected list form webpart. Or, in other words, my infopath web part, that I use, renders itself with received data in edit mode. I.e.
- it (Iinfopath form webpart) is connected by choosing "Get Form From" and
- the list form webpart by "Send Row of Data To"
in their "Connections" - while editing the web page presented at the entry of a list (e.g. AllItems.aspx, if default was not added and changed) .
How can I configure to receive (and render) the list item in Display/View or New/Create form in this case in connecting a Infopath Form? i.e. to make infopath form to render an item in other types/modes than Edit?
I am on MS Sharepoint Server 2010 (or it is on/after me)
Infopath sharepoints me in mysterious ways
- נערך על-ידי Gennady Vanin (Геннадий Ванин) יום רביעי 27 יוני 2012 11:39
כל התגובות
-
יום שני 25 יוני 2012 10:18מנחה דיון
Hi Gennady,
We can make connections before the custom list form and list view web part directly, and following are the detail steps:
1. Custom list form in InfoPath > Publish.
2. Browser to New Item page, by default, it should be
http://server/site/Lists/list name/Item/newifs.aspx
3. Add the list (list view web part) to the newifs.aspx page.
4. Make connections between them:
Edit page > Click the triangle on the right top of the InfoPath Form Web Part > Connections > Get Data From > list view web part > Provider Field Name: a field in list view web part > Consumer Field Name: column in InfoPath Form web part > Finish.
5. Save the change.
Let me know if you have any question.
Thanks & Regards,
EmirEmir Liu
TechNet Community Support
-
יום שני 25 יוני 2012 19:24
2. Browser to New Item page, by default, it should be
http://server/site/Lists/list name/Item/newifs.aspx
3. Add the list (list view web part) to the newifs.aspx page.
Thanks, Emir!
I see. It is useful trick and even kbow-how but it is a workaround.I need this for elaboration of more complex web page.
So, the immediate subquestions are:
- How to make a web page with Infopath form web parts rendering in all 3 modes/types:
- New/Create,
- Display/View,
- Edit/Update
- of the same item list?- and of different lists?
- נערך על-ידי Eduardo Noriega de ArmasMicrosoft Employee, Administrator יום שישי 29 יוני 2012 06:26
- נערך על-ידי Eduardo Noriega de ArmasMicrosoft Employee, Administrator יום שישי 29 יוני 2012 06:28
- How to make a web page with Infopath form web parts rendering in all 3 modes/types:
-
יום שלישי 26 יוני 2012 02:30מנחה דיון
Hi Gennady,
From your description, I know that you need to put New, Edit and Display InfoPath Form in a page together. We can create the page, then copy the InfoPath Form Web Parts from newifs.aspx, editifs.aspx and displayifs.aspx in SharePoint Designer to the new page.
Let me know if you have any further question.
Thanks & Regards,
EmirEmir Liu
TechNet Community Support
-
יום רביעי 27 יוני 2012 00:32Hi, Emir, Thanks again for guiding me to demistify ISarepoint's 2010 interaction with Infopath forms. I would say that I want more to put both New Infopath form from the same list view because Edit is used and only available Infopath item form and view are usually presented in entry of a list web page any way. So, the question is how to show both New and Edit or even just New Infopth form. BTW, I'd like to understand also how to switch the same IP form from one view to another. So, upon copying Infopath form web part from from newifs.aspx into another ASPX web page the latter gives the error in run-time (running in browser)
-
Error
Form control does not have ControlMode set.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: 09903e1f-da8e-4164-9f06-111d9ec01733
Go back to site
And the link "Troubleshoot issues with Microsoft SharePoint Foundation" shows the pop-up dialog box message:
- Do you want to view only the webpage content that was delivered securely?
This webpage contains content that will not be delivered using a secure HTTPS connection, which could compromise the security of the entire webpage
"More info", "YesЭб "No" buttons
- Navigation to the webpage was canceled
What you can try:
Retype the address.
- נערך על-ידי Eduardo Noriega de ArmasMicrosoft Employee, Administrator יום שישי 29 יוני 2012 06:16 Fixing bad formatted post
- נערך על-ידי Eduardo Noriega de ArmasMicrosoft Employee, Administrator יום שישי 29 יוני 2012 06:17
- נערך על-ידי Eduardo Noriega de ArmasMicrosoft Employee, Administrator יום שישי 29 יוני 2012 06:23
-
-
יום רביעי 27 יוני 2012 02:23
Hi Gennady,
From your description, I know that you need to put New, Edit and Display InfoPath Form in a page together. We can create the page, then copy the InfoPath Form Web Parts from newifs.aspx, editifs.aspx and displayifs.aspx in SharePoint Designer to the new page.
Let me know if you have any further question.
Thanks & Regards,
EmirTrying again to re-submit my previous screwed post which I can neither edit nor delete.
Waiting the feedback help from moderators on my "ticket" to support.Hi, Emir,
thanks again for guiding me to demistify ISarepoint's 2010 interaction with Infopath forms.I would say that I want more to put both New Infopath form from the same list view because Edit is used and only available Infopath item form and view are usually presented in entry of a list web page any way.
So, the question is how to show both New and Edit or even just New Infopth form.
BTW, I'd like to understand also how to switch the same IP form from one view to another.Upon copying Infopath form web part from from newifs.aspx into another ASPX web page the latter gives the error in run-time (running in browser):
- Error
Form control does not have ControlMode set.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: 09903e1f-da8e-4164-9f06-111d9ec01733Go back to site
And the link "Troubleshoot issues with Microsoft SharePoint Foundation"shows the pop-up dialog box message:
- Do you want to view only the webpage content that was delivered securely?
This webpage contains content that will not be delivered using a secure HTTPS connection, which could compromise the security of the entire webpage
"More info", "Yes ,"No" buttons
And upon pressing "Yes", I get:- Navigation to the webpage was canceled
What you can try:
Retype the address
Gennady Vanin (Novosibirsk) -- Геннадий Ванин (Новосибирск) Currently asking all questions in context of Office 365 (Plan E3) trial (Sharepoint 2010 / Infopath 2010)
- נערך על-ידי Gennady Vanin (Геннадий Ванин) יום רביעי 27 יוני 2012 17:33
- Error
-
יום רביעי 27 יוני 2012 10:43מנחה דיון
Hi Gennady,
After copied the InfoPath Form Web Part to a web part page, when we need to view it in browser, we need to also add some query string behind the URL. Here is an example:
1. Copy Edit InfoPath Form to the page.
2. Browser to the list and open edit a list in the InfoPath Edit Form, then the URL should be:Copy all the string after "editifs.aspx"
3. Add the string after the web part page you created, then the error will go away and you will be able to edit the item in the web part page. And acturally, we are only need 2 query string parameters: ../web part page.aspx?List={list GUID}&ID={item ID}
There is only one view in the custom list form, it is Edit Item view, this view will use to both create, edit and display items. We can open the InfoPath Form Web Parts of these 3 forms in SharePoint Designer and swith to code view, we can see that only the "ListFormMode" property has changed. In EditForm and NewForm, it is "Editable", In display form, it is "readonly". And there is no difference between new form and edit form. When there is no ID query string in editifs.aspx, it will create a new item, and when there is a ID query string in newifs.aspx, it will update that item instead of creating a new item.
So the only differnce it the "ListFormMode" property. You can use JavaScript to change this property in the page or add the 3 forms to a page and add asp buttons to the page to control the visibilities of the 3 forms in JavaScript to change the views.Thanks & Regards,
EmirEmir Liu
TechNet Community Support
-
יום רביעי 27 יוני 2012 18:03
Hi Gennady,
After copied the InfoPath Form Web Part to a web part page, when we need to view it in browser, we need to also add some query string behind the URL. Here is an example:
1. Copy Edit InfoPath Form to the page.
2. Browser to the list and open edit a list in the InfoPath Edit Form, then the URL should be:Copy all the string after "editifs.aspx"
3. Add the string after the web part page you created, then the error will go away and you will be able to edit the item in the web part page. And acturally, we are only need 2 query string parameters: ../web part page.aspx?List={list GUID}&ID={item ID}
There is only one view in the custom list form, it is Edit Item view, this view will use to both create, edit and display items. We can open the InfoPath Form Web Parts of these 3 forms in SharePoint Designer and swith to code view, we can see that only the "ListFormMode" property has changed. In EditForm and NewForm, it is "Editable", In display form, it is "readonly". And there is no difference between new form and edit form. When there is no ID query string in editifs.aspx, it will create a new item, and when there is a ID query string in newifs.aspx, it will update that item instead of creating a new item.
So the only differnce it the "ListFormMode" property. You can use JavaScript to change this property in the page or add the 3 forms to a page and add asp buttons to the page to control the visibilities of the 3 forms in JavaScript to change the views.Thanks & Regards,
Emir
Emir Liu
TechNet Community Support
Wow, thanks again, Emir!
I need to show new item IP form for a child (aka slave aka detail) list with preset lookup field received from parent (master) list on selecting an itenm there. As well as edit item IP form
I had no difficulties to do it in Sharepoint Designer 2010 (SPD 2010) fornon-Infopath forms without any code, just using GUI
But my employer insists me to do it using Infopath forms that is believed as more codeless approach.
I just do not grasp:
what's for the Infopath Web Part properties pop-up dialog that has "Views:" drop-down list with always the only choice:- Edit item (default)
if to access IP form properties in SPD 2010.
In through browser, there is no choice at all, just blank list (and inactive drop down list)!Is it a bug or by design?
Now, I am failing to follow any of your workarounds
For my ChildList list, I created infopath forms by clicking "Customize Form: and in opened Infopath Designer 2010 "Quick Publish"
In SPD2010, I create a web page by choosing on ribbon "Web Part Page" --> "Header, Left column, Body"
Placed on a 2-column web part page, in the left column the WebPartPages:XsltListViewWebPart for a child list by:
- clicking Insert on ribbon --> "Data View" --> ve chosen ChildList from drop-down list
Navigated to web page in browser and clicked Site Actions --> Edit Page --> on design surface, in the right column I clicked "Add a Web Part Page" --> Forms --> Infopath Form Web Part --> Add
(Or inserted the Infopath From Web Partand followed the same as below in SPD 2010 - the results, i.e. errors, are exactly the same!!!)
Clicked the drop-down list small arrow "Infopath Form Web Part menu"(from pop-up caption) in the upper right corner of the "Infopath Form Web Part" --> Connections --->
If, further, I choose "Get Data From", then I am getting the error :- "No Consumer Schema"
Cancel
so I am to choose the only available option "Get Form From"
The same is for a seconf inserted Infopath Form Web Part
So, I wonder whether I should pursue in choosing "Get Data From" if it always gives error?
And what is its difference with choosing "Get Form From" option
Gennady Vanin (Novosibirsk) -- Геннадий Ванин (Новосибирск) Currently posting in context of Office 365 (Plan E3), trial (Sharepoint 2010 Online/ Infopath 2010)
- נערך על-ידי Gennady Vanin (Геннадий Ванин) יום רביעי 27 יוני 2012 18:07
-
יום חמישי 28 יוני 2012 10:23מנחה דיון
Hi Gennady,
ControlMode property is a property of Form Field in ASP Custom New/Edit/Display Form Web Part, but not a property of InfoPath Form Web Part. So I think there should be some problem in another web part in your page. Could you please create a empty page and the InfoPath Form web part there to test it?
When the InfoPath Form Web Part is added from browser, it is a form can only be used to create new item. It you need a edit form, please copy the default web part from editifs.aspx page.
Thanks & Regards,
EmirEmir Liu
TechNet Community Support
-
יום חמישי 28 יוני 2012 16:04
Hi Gennady,
ControlMode property is a property of Form Field in ASP Custom New/Edit/Display Form Web Part, but not a property of InfoPath Form Web Part. So I think there should be some problem in another web part in your page. Could you please create a empty page and the InfoPath Form web part there to test it?
When the InfoPath Form Web Part is added from browser, it is a form can only be used to create new item. It you need a edit form, please copy the default web part from editifs.aspx page.
Thanks & Regards,
Emir
Emir Liu
TechNet Community Support
Hello, Emir,
ooops, I reproduced, what I wrote above, dozens, dozens and dozens of times from scratch, creating and recreating forms, aspx webpart pages and lists.
I am shocked to know that this is completely different for another person.That Infopath web form renders itself in edit mode getting a selected item fom list view on webparts connection by "Get Fotm From" (rather without any other choice) also in book [1, p.169-170] in section entitled:
- Use the Edit Form on the List Page
Scenario/Problem: You do not want the user to have to navigate to a separate
page or dialog to edit a list item
with the best reference to this excerpt that I could find in safaribooksonline requiring subscription
Cited:
[1]
STEVEN MANN
InfoPath with SharePoint 2010 How-To
Copyright © 2011 by Sams Publishing
Gennady Vanin (Novosibirsk) -- Геннадий Ванин (Новосибирск) Currently posting in context of Office 365 (Plan E3), trial (Sharepoint 2010 Online/ Infopath 2010)
- נערך על-ידי Gennady Vanin (Геннадий Ванин) יום חמישי 28 יוני 2012 16:08
- Use the Edit Form on the List Page