Getting data of repeating table under a condition - InfoPath Dev
in

InfoPath Dev

Getting data of repeating table under a condition

Last post 03-07-2011 07:15 AM by NMarien. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-24-2011 06:49 AM

    Getting data of repeating table under a condition

    Dear all,

    I'm new to infopath and made myself a repeating table where  people can fill in the following:

    Date   Event    Price

    With the help of this formule (Latest date) I was able to find the latest date (most recent) inside the repeating table.

    What I would like to do next, is to create new text-field where the 'Event' will be displayed, which is related to the latest date.

    ----------

    Example

    Latest date:  25-02-2011

    Date             Event           Price
    14-02-2011    Event 123     25 EUR
    18-02-2011    Event 456     30 EUR
    25-02-2011    Event 789     35 EUR

    [The field I would like to have:]  Event:   Event789

    ----------

    More in detail that he would repeat a value (in the repeating table) which is on the same row as the lastest date.

    Is this possible without programming? As I would like to sent these forms out via e-mail.


    Thank you all in advance!

    Regards,

    Niels

  • 02-24-2011 08:14 AM In reply to

    Re: Getting data of repeating table under a condition

    Could you attach a screenshot of your data source's layout?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-01-2011 11:27 PM In reply to

    Re: Getting data of repeating table under a condition

    Hi Jimmy,

    Thanks for your e-mail. Please find hereafter a more detailed explanation of what the purpose exactly is:  click here

     Thank you all for your help!!

    Best regards,

    Niels

  • 03-02-2011 01:25 AM In reply to

    Re: Getting data of repeating table under a condition

    Hello Niels,

     Thank you for providing that information in such a neatly laid-out fashion, but I need a little more information to answer your question.

    Could you provide a screenshot of your datasource that includes:

    The root node of the data source (the node at the very top)

    The field where you're storing the latest date

    The repeating group included in your current screenshot

    I'm not clear which fields in your repeating group correspond to the information you want to show in Table 1: Report per books..., You have lines that say "Report per books after income taxes" and "Income taxes", but I don't see fields with names like this in the Table_1 group.  Are they there and I'm not noticing them, or are they calculated from several fields?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-02-2011 03:15 AM In reply to

    Re: Getting data of repeating table under a condition

    Hi Jimmy,

    I've updated my html file (made it more detailed). Hopefully everything is clear now, otherwise I can always send you the original document?

    Thank you verry much in advance,

     

    Niels

  • 03-04-2011 07:02 AM In reply to

    Re: Getting data of repeating table under a condition

     Hi Jimmy,

     

    Sorry to bother you again... Did you perhaps had some time to see if you can help me solving this issue?

     

    Thank you very much in advance!

    Niels

  • 03-04-2011 07:36 AM In reply to

    Re: Getting data of repeating table under a condition

    Hello again,

     I apologize.  For some reason, I didn't get an e-mail notification of your e-mail from 3 days ago and just now got a notification of your most recent e-mail.

    There are a few points that are still unclear to me, but I think I have enough to go on.

    The XPath formula to get at the corresponding field value for the group with the maximum date is:

    /my:myFields/my:Table1[my:T1_accounting_year_closed = /my:myFields/my:maxDate]/fieldToRetrieve

    So to get the value of the ETR_per_return field in the row with the max date, you could use:

    /my:myFields/my:Table1[my:T1_accounting_year_closed = /my:myFields/my:maxDate]/my:ETR_per_return

    and you can use this in a rule or Expression Box control.

     

    And just as a tip, you don't have to have a control bound to a hidden field in order for it to work.  As long as the field is present in your data source, it will do its job.  So you can delete that 1px textbox for your hidden_field field.

     Is the above information enough to solve your problem?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-07-2011 07:15 AM In reply to

    Re: Getting data of repeating table under a condition

    Hi Jimmy,

    Thanks a lot for your help! Problem solved! :-)

    Regards,

    Niels

Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.