filter rows from two lists - InfoPath Dev
in

InfoPath Dev

filter rows from two lists

Last post 07-17-2013 12:18 AM by infopathdev3232. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-09-2013 03:46 AM

    filter rows from two lists

     I want to implement below functionality.

    LIST-A

    Name        ID
    A        1
    B        2
    C        3

    LIST-B

    Name(lookup(A))   usersA(multiple users)    usersB (multiple users)
        
    A            abcd;xyz;lmn        pqr;mno;xyz    
    B            lmn;123            mno;567

    I want to bind all names to dropdownlist from ListA depending on user(usersB column) from LISTB.
    ex: suppose if user xyz logged in.. dropdownlist shoud contain only A
        suppose if user mno logged in .. dropdownlist shud conatin both A,B (as mno user exists in both rows)

  • 07-09-2013 04:52 PM In reply to

    Re: filter rows from two lists

    Assuming you are using SharePoint 2010 lists and InfoPath ....

    Create a list called UserPermissions and create a row for each list that a user can view

    • LIST, USER 
    • 2, mno
    • 1, mno
    • 1, xyz

    Add a data connection to your InfoPath form to load the UserPermissions list when the form loads - make sure that you uncheck the box to automatically load the data connection on load. When the user opens the form, use a rule with an action to set the value of the query data field for USER to be userName() and then add an action to query the UserPermissions list. Now, in your dropdown, you will add a filter to show only values that occur in the UserPermissions LIST column.

    Easy to do.

    Patrick Halstead
    Project Manager at Qdabra
  • 07-10-2013 01:36 AM In reply to

    Re: filter rows from two lists

    Thx for reply. I will make requirement little simple to understand.

    List A

    ID Name     level 3(person or group datatype.. can select multiple users)

    1 AB  tom;sunny;someuser3;
    2 CD  someuser1;someuser2;someuser3;
    3 EF  someuser4;someuser5;

    I want to bind Name(field) from LIST A to dropdown list by filtering level 3 field.
    ex. if current user is someuser3 dropdown shud show two rows (1-AB,2-CD)
        if current user is someuser5 dropdown shud show one row(3-EF)

    as you suggested i added dataconnection to list A, and tried to set field value for 'level3' field, but there is no field for 'level3' under 'queryFields'under dataconnection. Here issue is i am unable to filter single user among group of users( as level 3 field can hold more than one user)

  • 07-14-2013 03:04 PM In reply to

    Re: filter rows from two lists

    Did you add the column to the data connection? Are you using SharePoint 2010 or 2007?

    Patrick Halstead
    Project Manager at Qdabra
  • 07-14-2013 07:45 PM In reply to

    Re: filter rows from two lists

    am using infopath 2010. Yes i selected column(person/group) in data connection, but am not getting same field under query group.  As person/group column accepts multiple users, am unable to filter with one user(current user). let me know if you need any other details.. thx..

  • 07-17-2013 12:18 AM In reply to

    Re: filter rows from two lists

     Any solution for my issue???

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