Populating a repeating table with data from a secondry source - InfoPath Dev
in

InfoPath Dev

Populating a repeating table with data from a secondry source

Last post 11-02-2008 10:21 AM by NOVICE. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-28-2008 03:36 PM

    • NOVICE
    • Not Ranked
      Male
    • Joined on 09-27-2008
    • UK
    • Posts 18

    Populating a repeating table with data from a secondry source

    Your have to forgive me if this question has been asked as I haven't been able to locate it. I know how to populate a table with data from a secondry source and I've managed to set the up the same rule for a repeating table.

    I have a table with three columns when you enter data into the first column this will be a numerical entry such 1234 it runs a query on a database and via a rule attached to the first text box it populates the other two fields with the information relating to that record, inserting a second row you can run the rule again however for some reason the table seems to sort in ascending order of the numbers value so if I enter 1234 it populates correctly then open a second row enter 0000 it copies the entry from above as opposed to populatiing the second row with the 0000 entry.

    The only way it appears to work is if I enter the numbers in ascending order of value. Hoping you can can offer an explanation for how to get round this, hopefully using the user interface for rules and conditions as programming is far from my forte.

     Thanks in advance.

    NOVICE :-)
  • 10-30-2008 12:13 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Populating a repeating table with data from a secondry source

    Hello,

    In InfoPath form row order should display in the order of returning the rows from database. We can't the change order of returning rows using rule. Here are the two alternatives,

    1. If you know exactly for giving input value return null or no change for output then we can add this condition to that rule.

    2. We can write the code to change the order of displaying in InfoPath form. For this we can take all the repeating rows in one list(temporary variable) and remove the existing rows from. Add the repeating rows to parent node on which order we want show in InfoPath through the code.

  • 10-30-2008 03:13 PM In reply to

    • NOVICE
    • Not Ranked
      Male
    • Joined on 09-27-2008
    • UK
    • Posts 18

    Re: Populating a repeating table with data from a secondry source

    I am afraid the numbers in question are unique and vary. Is it it still possible to create a condition. In essence I am trying to overide the sort because the entries will be entered in random order. Is there any way to achieve this. If it involves code I am afraid you'll have to spell it out for me as I have built the form entirely on the rules and conditions. Thanks
    NOVICE :-)
    Filed under:
  • 10-31-2008 12:34 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Populating a repeating table with data from a secondry source

    Hello,

    We can't change the order of displaying the rows in repeating table in InfoPath using rules or conditions.

    Note: InfoPath form will show the data in the order of getting data from the database.

  • 10-31-2008 02:09 PM In reply to

    • NOVICE
    • Not Ranked
      Male
    • Joined on 09-27-2008
    • UK
    • Posts 18

    Re: Populating a repeating table with data from a secondry source

    Do you have any code for making the repeating field return records without being ordered into low to high and how would I apply this. Many thanks in advance.
    NOVICE :-)
  • 11-02-2008 07:27 AM In reply to

    Re: Populating a repeating table with data from a secondry source

    Could you describe the set up of this table/the data sources with a bit more detail?  InfoPath does not sort repeating tables, and if it is showing up sorted it is more than likely that's because that's how the data is being returned from the secondary data source.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-02-2008 10:21 AM In reply to

    • NOVICE
    • Not Ranked
      Male
    • Joined on 09-27-2008
    • UK
    • Posts 18

    Re: Populating a repeating table with data from a secondry source

    I have created a repeating table with three columns the first one has attached a rule that performs three actions first is to query the secondary data source with the data entered in the first field the other two actions set a field value to that of the data returned from the secondary data source. If I enter the staff number in ascending order of value it populates correctly.

     Example 1

    However if I enter data in descending order it copies the first record like so.

     Example 2

    The database has no sort attached. Help?!?

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