Get Members of Distribution or SharePoint group - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Get Members of Distribution or SharePoint group

Last post 10-18-2017 10:46 AM by TOE_CHEESE. 22 replies.
Page 2 of 2 (23 items) < Previous 1 2
Sort Posts: Previous Next
  • 10-12-2017 10:55 AM In reply to

    Re: Get Members of Distribution or SharePoint group

    Hilary, I got the SP list into my repeating table however my list is 1500 items. I am filtering based on the value of a department drop-down list. I currently have 100 groups inserted into the default values. I am then using a formatting rule on the repeating table to hide all rows where the department drop-down does not equal the department field in the repeating table. I am seeing if the repeating table row that meets the criteria doesn't fall in the first 100 rows of the SP list it doesn't display. Is there additional filtering needed?
  • 10-16-2017 07:39 AM In reply to

    Re: Get Members of Distribution or SharePoint group

    I think instead of using a formatting rule to hide rows, you should only be populating rows where the department matches. So when you get your ID column, include a filter so that you are only getting the count of preceding-siblings that match on department. That way you aren't copying in data you don't need.
    Hilary Stoupa

  • 10-16-2017 12:06 PM In reply to

    Re: Get Members of Distribution or SharePoint group

    Hilary, I am having trouble adding the filter as you suggest. I am not sure where to add it. I have 3 rules on a "Set" field that gets the ID in field1=xdXDocument:GetDOM("Teams_roster")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[count(current()/../preceding-sibling::my:group2) + 1]/d:ID, the fullname in field2=xdXDocument:GetDOM("Teams_roster")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[../d:ID = current()/../my:field1], and the department in field3=xdXDocument:GetDOM("Teams_roster")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Dept[../d:ID = current()/../my:field1]. The set=1 condition is on field2 and field3. Thanks
  • 10-16-2017 12:10 PM In reply to

    Re: Get Members of Distribution or SharePoint group

    Can I see your form? You can email it to me if you don't want to post it here...
    Hilary Stoupa

  • 10-16-2017 02:14 PM In reply to

    Re: Get Members of Distribution or SharePoint group

     So, I'd guess you would want to set the ID field with something like this:

    xdXDocument:GetDOM("Teams_roster")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[count(current()/../preceding-sibling::my:group2) + 1][d:Dept = XPATH TO YOUR DEPT FIELD]/d:ID

    With the bold part being the main data source field (or other field) bound to the dropdown list. Of course, it seems like you also could just not query your data on load, and instead query for just the data you need when the department dropdown changes? Set the list query field & execute the query? 

    Hilary Stoupa

  • 10-17-2017 01:45 PM In reply to

    Re: Get Members of Distribution or SharePoint group

    Hi Hilary, I'm still having trouble. I took your sample from earlier in this post and modified it to demonstrate what I am trying to accomplish. In my sample, I am trying to filter States where their abbreviation begins with the letter selected from the drop-down.
  • 10-17-2017 04:13 PM In reply to

    Re: Get Members of Distribution or SharePoint group

     I removed a rule on your button, then added one to clear fields so you could pick a letter then pick another one. :)

    Also, I think I have the filters backwards here:

    xdXDocument:GetDOM("Teams_roster")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:Dept = XPATH TO YOUR DEPT FIELD][count(current()/../preceding-sibling::my:group2) + 1]/d:ID 

    Hilary Stoupa

  • 10-18-2017 10:46 AM In reply to

    Re: Get Members of Distribution or SharePoint group

    Thank you Hilary for all your effort to help me with this. I think I have it working.
Page 2 of 2 (23 items) < Previous 1 2
Copyright © 2003-2017 Qdabra Software. All rights reserved.
View our Terms of Use.