Repeating table is showing only first row of XML-Data Source - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating table is showing only first row of XML-Data Source

Last post 02-19-2014 07:13 PM by Mr Switch. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 02-21-2012 07:36 AM

    • Joern
    • Top 150 Contributor
    • Joined on 09-28-2010
    • Posts 79

    Repeating table is showing only first row of XML-Data Source

    Hi folks,

     I know this is a common issue but I've still haven't found a suitable solution.

    I have a secondary data source to a .XML-file. This .XML-file looks like this:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <Fixtures>

          <Match>

                <Type>Type A</Type>

                <Date>Date</Date>

               <Time>Time</Time>

               <Home>Home</Home>

               <Away>Away</Away>

        </Match>

        <Match>

                <Type>Type A</Type>

                <Date>Date</Date>

                <Time>Time</Time>

                <Home>Home</Home>

                <Away>Away</Away>

        </Match>

         <Match>

                <Type>Type B</Type>

               <Date>Date</Date>

               <Time>Time</Time>

               <Home>Home</Home>

               <Away>Away</Away>

       </Match>

    </Fixtures>

    With this secondary data source I populate a repeating table.

    Above the repeating table is a dropdown field in what the user can select a type (Type A, type B, type C, etc.).

    Depending on what type the user has selected I want the repeating table to show only the corresponding matches from the .XML-File.

    I received that with using a rule - at least I thought I did so.

    But instead of showing both Matches when selecting "Type A" in the dropdown-field, the repeating table is showing only the first match.

    Do you have any hints how I can receive that both matches with "Type A" are shown?

    In reality there are further matches with Type A but I've shorten the .XML-File for the sake of clarity.

    Thank you very much in advance for your support.

    Cheers

  • 02-21-2012 10:36 AM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    What is the conditional formatting you are using? Change the first drop down to "the expression" and paste the resulting XPath here....

    Hilary Stoupa

  • 02-21-2012 11:54 PM In reply to

    • Joern
    • Top 150 Contributor
    • Joined on 09-28-2010
    • Posts 79

    Re: Repeating table is showing only first row of XML-Data Source

    Thank you for your response.

    Actually, I do not use any conditional formatting. I assigned a rule to the dropdown-field like: Set a field's value: field(date) =  Date[Type=dropdown-field]

    How can I see the XPath of a dropdown in IP2010?

    Note:

    field(date) = This field is a field within the repeating table that is supposed to show the date of the match.

  • 02-22-2012 08:57 AM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    Your rule formula then for the value - if you could click the fx button to open the formula editor dialog and then select the Edit XPath checkbox - If I can see the actual XPath you are using, I may be able to help you figure out what's going wrong. :-)

    Hilary Stoupa

  • 02-22-2012 11:04 PM In reply to

    • Joern
    • Top 150 Contributor
    • Joined on 09-28-2010
    • Posts 79

    Re: Repeating table is showing only first row of XML-Data Source

    Thanks for your patience.

    The XPath is as follows: xdXDocument:GetDOM("Spiele")/Spielplan/Spiele/Datum[../Typ = xdXDocument:get-DOM()/my:meineFelder/my:gruppenauswahl]

    'gruppenauswahl' is the dropdown-field

    Thanks for your support.

  • 02-23-2012 05:34 PM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    Sorry to be a bit dense this week - I just don't quite get it. You want to set the value of your target field to every instance of Datum where Typ = gruppenauswahl?

    Hilary Stoupa

  • 02-23-2012 10:37 PM In reply to

    • Joern
    • Top 150 Contributor
    • Joined on 09-28-2010
    • Posts 79

    Re: Repeating table is showing only first row of XML-Data Source

    Sorry, maybe I haven't explained it well.

    But You get it right.

  • 02-24-2012 08:47 AM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    I'm attaching a sample form that I think does what you want. Save it locally and right click to select Design, from there you should be able to preview.

    Hilary Stoupa

  • 02-28-2012 06:38 AM In reply to

    • Joern
    • Top 150 Contributor
    • Joined on 09-28-2010
    • Posts 79

    Re: Repeating table is showing only first row of XML-Data Source

    Okay, I got it working so far. Thanks.

    Now, I still have a problem that I explain with the help of your sample.

    Depending on what value the user chooses in the filter, the corresponding items will be shown in the repeating table.

    Now I'd like to have pictures that should be shown in this very repeating table depending on the item that is shown in the row. The pictures come from another 2nd Data Connection.

    I have tried to add another column in your repeating table but I wasn't able to put a picture in this column.

    Any idea how to get this pictures in the repeating table or any suggestions how I can get the pictures into a XML-file?

  • 02-15-2014 12:59 PM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    Hello,

    I have been working with the sample you provided and I have a question or 2. Please let me know if I should start a brand new post, forgive me if I'm violating any forum rules.

    I have implemented your solution for a similar task however I would like the user to be able to click a button to add the filtered record to a different database. Going off your example I would have a separate repeating table in a different view, with the same fields and 2 extra fields preceding; a date logged field and a user name field.

    example
    user form has date and user name at top (not on provided example)
    user selects Lyndon's
    3 records pull up
    user enters calories taken for each 3 records
    User clicks button
    The 3 records are saved in a different table (calorie log). Date and username are added as well.


    Thank you ma'am.

    James.

  • 02-17-2014 10:55 AM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    Well, in my sample form, the tables are bound to the same data source. So, I'm not sure that this is going to be applicable to your situation - when you say "add the filtered record to a different database" I think you may be dealing with a database bound form - is that correct?

    Hilary Stoupa

  • 02-17-2014 11:16 AM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    Yes the form is bound to various tables in an access database. I used the word database in error. I want to add the filtered results to another table. For example if 3 records pull up I want the user to make changes to those 3 but instead of saving the result in the same table the records are copied and added to the log table.
  • 02-18-2014 07:34 AM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    So - here is the difficulty with that - Out of the box, InfoPath doesn't have any rule actions that can be used to add rows to a table. This leaves writing custom code, or possibly an add-in like qRules (not sure if we have tested qRules much with DB bound forms).

    Hilary Stoupa

  • 02-19-2014 07:13 PM In reply to

    Re: Repeating table is showing only first row of XML-Data Source

    Ok I suspected that. Thanks for the info, much appreciated.
Page 1 of 1 (14 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.