A kind a filter for a ListBox - InfoPath Dev
in

InfoPath Dev

A kind a filter for a ListBox

Last post 03-15-2006 02:10 AM by Rokp. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-14-2006 08:29 AM

    • Rokp
    • Top 500 Contributor
      Male
    • Joined on 03-06-2006
    • France
    • Posts 36

    A kind a filter for a ListBox

    Hello.

    I want to make a ListBox in a repeting table (for example).

    The ListBox is linked to a XML file in witch is stored names (Alfa1, Alfa2, Alfa3...).

    I want a selected name to be impossible to re-use in an other line of the table.

    Somebody help me! i'm a poor alone boy.
    InfoPath 2003 SP2
  • 03-14-2006 11:28 AM In reply to

    Re: A kind a filter for a ListBox

    Hello Rokp, the poor alone boy! :)

    Please check out this tutorial, I think it will have the information you are looking for:http://www.infopathdev.com/howto/tutorials/default.aspx?i=51dce616335a4ff6a78f2d289baf4651
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 03-15-2006 12:56 AM In reply to

    Re: A kind a filter for a ListBox

    Hi guys,
    I think what Rokp wants is different from what MFaus explains.

    The solution given by MFaus eliminates duplicate values in a listbox.

    But what Rokp wants is....

    1)Have a listbox in the repeating table.

    2)Assume that User selects "A" in the listbox for row1 of the repeating table

    3)Now in row2,user should not be allowed to select "A" again in the listbox i.e the selection in the listbox should be unique for each row.
    I am not good at "Expressions" in Infopath.So I would opt for code.

    So what I would do is write code in the OnAfterChange event for that listbox field.

    1)In the code,compare the listbox value selected for the current row with the listbox values in the previous rows.

    2)If it matches with any other row,then throw an alert and reset the selected value in the current row so that the user has to reselect a different value in the current row dropdown.

    Hope it is clear.

    Regards,
    Abhishek
  • 03-15-2006 02:10 AM In reply to

    • Rokp
    • Top 500 Contributor
      Male
    • Joined on 03-06-2006
    • France
    • Posts 36

    Re: A kind a filter for a ListBox

    That's right Abhishek ... I will try a code.

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