Sharepoint 2007 - Rule based filtering - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Sharepoint 2007 - Rule based filtering

Last post 06-21-2011 11:25 AM by Caeanis. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-10-2011 07:56 AM

    Sharepoint 2007 - Rule based filtering

     I have two data sources, both have a common field, UID (which is the userid of an individual).  The second data source has 3 fields, UID, First_Name, Last_Name

    on my form I have a table which has a drop down list that contains userids, and two text fields which are for first and last names.  I set up a rule for the drop down list so that when the drop down value is selected, a lookup on the second data source to populate the first and last names. However when I preview the form, and select a value from the drop down nothing happens.  I have also tried to do it programmatically and it fails to pull find the corresponding records in the second data source even though I can filter the list in sharepoint and see the names and user id from there.  Not sure why this doesn't work... any ideas?

  • 06-10-2011 08:14 AM In reply to

    Re: Sharepoint 2007 - Rule based filtering

    Well, first, drag the data fields for your secondary data sources onto your form canvas, so you can see them -- you can clean it up after you know what's going on. I'd also add a text or expression box bound to the same field as your drop down control. Make very sure that you do have a match on the User Id -- that the case is the same, that there isn't any trailing white space (some data sources are cleaner than others....)

    What's your rule look like? Before you paste it into a reply, tick the Edit XPath box so that the full XPaths show....

    Hilary Stoupa

  • 06-10-2011 08:34 AM In reply to

    Re: Sharepoint 2007 - Rule based filtering

     I have the rule set up to run when the dropdownlist (bound to a field called compassid) is not blank.

    I have tried both variations below.  Does current() not work on Browser capable forms?  I don't know if it makes a difference as neither of the below seem to work.

    xdXDocument:GetDOM("Usr")/dfs:myFields/dfs:dataFields/dfs:Usr/@Last_Name[../@UID = .]

    xdXDocument:GetDOM("Usr")/dfs:myFields/dfs:dataFields/dfs:Usr/@Last_Name[../@UID = current()]

  • 06-14-2011 08:43 AM In reply to

    Re: Sharepoint 2007 - Rule based filtering

     I just discovered something, for some reason my secondary data source isn't pulling all the data over, it seems like it's only pulling the first page worth of records as views from Sharepoint.  Not sure why.  Perhaps when I set it up originally I clicked something although I can't imagine what that'd be.  Or maybe there is a limit to the number of records a drop down will hold.  The data source has about 12, 000 records in total...

  • 06-21-2011 11:25 AM In reply to

    Re: Sharepoint 2007 - Rule based filtering

     I found that even if you go into the form or document library settings and set it to display all, data connections default to what ever the limit is even if that setting isn't set.  Once I set the view to display only the limit and increased the limit past the default 100.  The data source picks up all the records and thus allows the filtering to work as I intended.

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