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 / November 2007

Tip: Looking for answers? Try searching our database.

Calculated Field in a Secondary Data Connection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
blackhawk - 14 Nov 2007 00:26 GMT
Is there a way, without coding, to put a new field into a repeating table
that is driven by a secondary data source, where this field performs a
calculation on two other fields within each row of the repeating table?  

For example, I have one column for 2006 and another column for 2007, and
what I want to calculate is the variance between the columns.

I can create a field in the main data source contained within a repeating
group and place it in the table, but I only get the results of the first
record.   If this is the right methodology for doing this?   If so, what I
can't figure out is:  Should I be filtering off the secondary data source or
the main data source, and what context does Current() operate in; the
repeating table or the main data source?

Here is the actual calculation:

xdXDocument:GetDOM("History")/dfs:myFields/dfs:dataFields/tns:StringResponse/tns:StringResult/default/QueryResults/DataRow/Col8
-
xdXDocument:GetDOM("History")/dfs:myFields/dfs:dataFields/tns:StringResponse/tns:StringResult/default/QueryResults/DataRow/Col7

Thanks for the help.
S.Y.M. Wong-A-Ton - 16 Nov 2007 06:55 GMT
If you are able to add an empty "dummy column" to the source of your
secondary data source, it will show up in the repeating table for the
secondary data source and this will allow you to perform the calculation.
current() works within the context of the repeating table that it is used in.
I haven't yet found a codeless way to update a certain row in a repeating
table from outside the repeating table. As far as I know, you'll have to
write code if you want to do this.
---
S.Y.M. Wong-A-Ton

> Is there a way, without coding, to put a new field into a repeating table
> that is driven by a secondary data source, where this field performs a
[quoted text clipped - 17 lines]
>
> Thanks for the help.
 
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.