Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2007

Tip: Looking for answers? Try searching our database.

connecting two infopaths

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
swathi - 31 Jul 2007 17:22 GMT
Hi,

I have a question regarding connecting two infopaths.
How can we connect two infopaths through a common column?
I have an infopath with EMPNO1 and this infopath contains another file
attachment(infopath) and I have to popup the second infopath with the same
EMPNO1.
How can we do it?

Thanks in advance
Kalyan G Reddy MVP (GGK Tech) - 31 Jul 2007 18:08 GMT
Hello

This involves a complex workaround. You should write a code to get the value
on Onload when the second Infopath Form(Attachment) is opened. This Form will
read the first form and get the value.
Signature

Kalyan G Reddy - INFOPATH MVP 2007
http://www.ggktech.com

> Hi,
>
[quoted text clipped - 6 lines]
>
> Thanks in advance
swathi - 31 Jul 2007 18:46 GMT
so, where I have to write the code,
Tools -> Programming-> loading event

under Forms_Loading event.....
Is this right?

> Hello
>
[quoted text clipped - 12 lines]
> >
> > Thanks in advance
K.Ramana Reddy(GGK Tech) - 01 Aug 2007 04:32 GMT
Hi,

Yes, You need to wroite the code to in Load event to load the Infopath form
and then get the field value you want use.

Signature

k.Ramana Reddy
http://www.GGKtech.com

> so, where I have to write the code,
> Tools -> Programming-> loading event
[quoted text clipped - 18 lines]
> > >
> > > Thanks in advance
swathi - 01 Aug 2007 20:10 GMT
How to write code for this task????

> Hi,
>
[quoted text clipped - 23 lines]
> > > >
> > > > Thanks in advance
swathi - 05 Aug 2007 04:24 GMT
I tried the following code.

try
           {
               string strCustID = e.InputParameters["CustID"];
               DataSource dsCustomers = this.DataSources["GetCustID"];
               XmlNamespaceManager ns = this.NamespaceManager;
               XPathNavigator xnCustomer = dsCustomers.CreateNavigator();
               XPathNavigator xnCustomer =
xnCustomer.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:Customers/tns:CustomerID");
               xnCustomer.SetValue(CustomerID);
               dsCustomer.QueryConnection.Execute();
           }
           catch (exception e)
           {
               MessageBox.Show(e.message,"Error");

           }

but encountered the following error:

System.Collections.Generic.KeyNotFoundException was unhandled by user code
 Message="The given key was not present in the dictionary."
 Source="mscorlib"
 StackTrace:
      at System.ThrowHelper.ThrowKeyNotFoundException()
      at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
      at
Microsoft.Office.InfoPath.Internal.ReadOnlyDictionary`2.System.Collections.Generic.IDictionary<K,V>.get_Item(K key)
      at customer_Checklist.FormCode.FormEvents_Loading(Object sender,
LoadingEventArgs e)
      at
Microsoft.Office.InfoPath.Internal.FormEventsHost.OnLoad(DocReturnEvent
pEvent)
      at
Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad(DocReturnEvent pEvent)

Is this the process for transferring the value of a field from one infopath
to another infopath.  
Thanks in Advance

> Hi,
>
[quoted text clipped - 23 lines]
> > > >
> > > > Thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.