I want to open different forms for different SharePoint list views so I need to get current page full URL on an InfoPath 2010 form. How can I do this through XPath or XQuery?
|
Probably you do not need full URL but only that part that triggers default views? Most Infopath 2010 controls have "Insert Function..." button where you can choose various URL functions, related to your context For example, here is an image of text box properties in context of infopath form for (in context of) a list:
Now, when you tell about Xpath or JQuery, you most probably do not understand that Infopath is codeless approach to crating forms. Take it or leave it altogether. Update: The same IP form is used, depending on context, in different web pages. As such, determining a web page URL from inside of and by means of Infopath form, by quering its own XML data does not make sense to me. IP form does not control its use, it is just being used from outside. Page URL is external data for IP form, you should get this URL outside of IP form and pass/return it to Infopath Form Web part, if you want to show it there. You can't learn dynamic or run-time or external data by querying internal or static or XML data of infopath form. You can provide it by external means only and use it by external means only. How to do it is another and different question For example, On design surface of web page in browser (Site Actions --> Edit Page), place this web part and in your Infopath Form Web Part click small-black-down-arrow drop-down-list on the upper right corner ---> Connections --> Get Data (Filter Value) From --> Click the name of your placed web part --> on the following popup dialog choose the field where to put caught data in "Consumer Field Name" drop-down list. |
|||||||||||
|

