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

Tip: Looking for answers? Try searching our database.

latest date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sboyd - 10 Oct 2007 18:56 GMT
I'm trying to get the latest date in a repeating table for the default
date on another date on the form.  Does anyone know the correct syntax
to do this.
I have tried this:
//dataFields/Flight_Log/Flight_Leg/@Actual_Departing_Date[last()]

This is getting the first date in the table which is on the first
row.  It doesn't pick up a later date on the second row.
I think InfoPath is far lacking in the function area.  This stuff is
murder in comparison to other Microsoft programs.
S.Y.M. Wong-A-Ton - 11 Oct 2007 07:08 GMT
It is difficult to say what the correct syntax should be, since you haven't
listed the structure of the XML of your form. Try moving the last() filter up
to the node that repeats, for example

//dataFields/Flight_Log/Flight_Leg[last()]/@Actual_Departing_Date

if Flight_Leg is the node that repeats. Note: It looks like you might also
be missing namespaces in your XPath expression, "dfs" and/or "my".

In defense of InfoPath: One day I won't be able to say this anymore, but for
now, InfoPath is still a relatively "young" member of the Office family, so
it still needs to "grow". I'm sure it will get better with time. Having said
that, your last sentence brought a smile to my face, so thank you for that. :)
---
S.Y.M. Wong-A-Ton

> I'm trying to get the latest date in a repeating table for the default
> date on another date on the form.  Does anyone know the correct syntax
[quoted text clipped - 6 lines]
> I think InfoPath is far lacking in the function area.  This stuff is
> murder in comparison to other Microsoft programs.
sboyd - 11 Oct 2007 21:30 GMT
On Oct 11, 2:08 am, S.Y.M. Wong-A-Ton
<SYMWongA...@discussions.microsoft.com> wrote:
> It is difficult to say what the correct syntax should be, since you haven't
> listed the structure of the XML of your form. Try moving the last() filter up
[quoted text clipped - 24 lines]
>
> - Show quoted text -

I tried this.  It didn't give me any errors but it didn't return any
information.  I've tried several variations.  I either only get the
1st date on the 1st row or no date.  The dates are on separate lines
but they are within the same repeating section.  I do have a repeating
section on each row but the date is not in that section.  Would
that have anything to do with it?
S.Y.M. Wong-A-Ton - 12 Oct 2007 01:01 GMT
Two things:
1. What version of InfoPath are you using?
2. Are you able to paste the XML of your InfoPath form in a post? Remove any
sensitive information from it before you do.
---
S.Y.M. Wong-A-Ton

> On Oct 11, 2:08 am, S.Y.M. Wong-A-Ton
> <SYMWongA...@discussions.microsoft.com> wrote:
[quoted text clipped - 33 lines]
> section on each row but the date is not in that section.  Would
> that have anything to do with it?
 
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.