Can I pull limited information from one form into another?

L

LisaP

I am creating a weekly status report for a SHarePoint site using InfoPath. I
would like to pull information from one week's "Task for next week" into the
following week's "Task from last week" section. Is this possible? So far
I've only been able to create a repeating section, but it includes all
entries for "Task for Next week" rather than one.
 
M

Matthew Blain \(Serriform\)

Just a warning: the Title field is not guaranteed to get the filename! (It's
an editible field in Sharepoint.) You'll have to hack the XSF a bit to get
the URL or filename fields. I forget what they are off the top of my head,
take a look at the results of the GetList web service to figure them out, or
post again and I'll dig up the info from the book.

For this particular task, you could use a well-known-nameing scheme like
Greg suggests, or promote the 'task date' to a column in sharepoint, then
use the sharepoint list data connection (or a custom call to the list web
service) to get the exact filename/URL of the task.

Two totally different solutions is to investigate NewFromSolutionFromData or
the Merge Forms functionality.

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com

"Greg Collins [MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in message
Sure you can... If you know the name and location of the file you can simply
have some code which does the following:

oXml = XDocument.CreateDOM();
oXml.async = false;
oXml.load("http:// wss.MySharePointSite.com/Folder/FormFile.xml");
oXml.setProperty("SelectionNamespaces", "xmlns:foo=\"http:// foo\"");

You can also set up a SharePoint List data connection to get a list of files
stored in a particular folder. The "Title" field gives the filename.

Once you've loaded the file and set the namespaces, then you can access it
just like any other DOM. If you have portions of the two files which are
identical, you can just copy a section from the file to the main DOM using
replaceChild().

If your files are well-named you should be able to do it without any user
intervention.

I hope this helps!

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



I am creating a weekly status report for a SHarePoint site using InfoPath.
I
would like to pull information from one week's "Task for next week" into the
following week's "Task from last week" section. Is this possible? So far
I've only been able to create a repeating section, but it includes all
entries for "Task for Next week" rather than one.
 
Top