I am cutting and pasting from a sample form to get my idea to work. What I
want to do is to have some icons that will advance the data forward and
backward. I am having trouble getting the filter to work. Here is the
layout from the sample application
Page(secondary)
NumberOfRows
StartingRows
ShowFullLastPage Here are the filters
position() >= xdXDocument:GetDOM("Page")/Page/StartingRow and
position() < xdXDocument:GetDOM("Page")/Page/StartingRow +
xdXDocument:GetDOM("Page")/Page/NumberOfRows
Here is my layout.
Main(primary)
TOTALS
NumberOfRows
StartingRows
CashApp
Field1
Field2 etc
My question is how do I modify the above filter to work on my layout? In
the sample he was filtering the master record on a secondary source. In mine
I want to filter the detail as indicated by Cashapp and the fields below
it.Mine is on the primary Datasource and I have no secondary.
A secondary question I have is my data loads rather slowly. Will setting it
up with a filter and the ability to page through my data improve speed?
Thanks in Advance Randy
Hi Randy,
I'm not sure what version of InfoPath you're using (looks like 2003?) but I
would think it would be something like:
position() >= xdXDocument:GetDOM("Main")/Main/TOTALS/StartingRow and
position() < xdXDocument:GetDOM("Main")/Main/TOTALS/StartingRow +
xdXDocument:GetDOM("Main")/Main/TOTALS/NumberOfRows
i.e. replace Page with Main, and add the TOTALS node as well.
HTH
Gavin.

Signature
InfoPath Knowledge Base
http://www.infopathkb.com/
2B | !2B
> I am cutting and pasting from a sample form to get my idea to work. What I
> want to do is to have some icons that will advance the data forward and
[quoted text clipped - 30 lines]
>
> Thanks in Advance Randy
randyb - 23 May 2008 04:05 GMT
That was what I tried prior to posting. I received the following error.
Infopath cannot create a new blank form
The form template is not valid
When I click on show details I get
InfoPath cannot open the following view: Working
The XSL transform for the View XSL failed.
InfoPath
A call to XDocument.GetDOM failed. The DataObject "Main" does not exist.
Error occurred during a call to property or method 'GetDOM'.
> Hi Randy,
>
[quoted text clipped - 45 lines]
> >
> > Thanks in Advance Randy
Gavin McKay - 23 May 2008 04:12 GMT
Where are you putting this code? Is it in a code-behind file? And what
version of InfoPath are you using?
Gavin.

Signature
InfoPath Knowledge Base
http://www.infopathkb.com/
2B | !2B
> That was what I tried prior to posting. I received the following error.
>
[quoted text clipped - 59 lines]
> > >
> > > Thanks in Advance Randy
randyb - 23 May 2008 04:21 GMT
I am putting the code in the repeating table properties >> Display >> Filter
Data. I noticed if I added a secindary datasource and added the same code it
did not error out. Could it be because it is a primary datasourse. In the
sammple I copied this from it was on a secondary datasource.
Thanks,
Randy
> Where are you putting this code? Is it in a code-behind file? And what
> version of InfoPath are you using?
[quoted text clipped - 64 lines]
> > > >
> > > > Thanks in Advance Randy
randyb - 23 May 2008 04:22 GMT
I forgot, I am using 2003.
Randy
> Where are you putting this code? Is it in a code-behind file? And what
> version of InfoPath are you using?
[quoted text clipped - 64 lines]
> > > >
> > > > Thanks in Advance Randy