GetMembersOfGroup dropdown - InfoPath Dev
in

InfoPath Dev

GetMembersOfGroup dropdown

Last post 01-03-2012 12:34 PM by smonczka. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 11-22-2011 07:47 AM

    GetMembersOfGroup dropdown

    Is it posible to use GetMembersOfGroup to populate a dropdown and if so how?

    Thanks,

    Steve

     

     

  • 11-22-2011 09:19 AM In reply to

    Re: GetMembersOfGroup dropdown

    Yes, it is possible. You'll pass in a group name then call GetMembersOfGroup. The web service will return a list of the members in that group, and you can use that list to populate a dropdown. Dropdowns in your main data source can be set to get their data from an external data source, in this case, GetMembersofGroup.


    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 12-09-2011 01:40 PM In reply to

    Re: GetMembersOfGroup dropdown

    Ernesto,

    Sorry it's taken so long to get back to your post.  As soon as you fix one problem two more pop up and I've been putting fires out ever sence.  I finaly got time to get back to this project. 

    Can you tell me how Iwould pass the group name to the call?

    Thanks for your time,

    Steven'

  • 12-12-2011 04:49 AM In reply to

    Re: GetMembersOfGroup dropdown

    No problem, Steven.

    Check out the user guide; it should clarify everything related to these web services. If it does not, please let us know.

    Thank you.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 12-30-2011 07:20 AM In reply to

    Re: GetMembersOfGroup dropdown

    Ernesto,

    Thank you for your responce and pointing me in the right direction.  Thats exactly the info I was looking for. 

    Steven 

  • 12-30-2011 11:53 AM In reply to

    Re: GetMembersOfGroup dropdown

    Ernesto using the Users Guide i was able to reproduce the steps to use both the GetGroupsForUser and GetMembersOfGroup methods in a blank template.  but im still not sure how to use this information in a drop down. 

     What I did was

    1. Include the GetMembersOfGroup as a data source. 

    2. Created a drop down field called get group.

    3. Used the secondary source (GetMembersOfGroup) as the data source for the drop down.

    4. fildered the value of the method where groupAlias = "SalesGroup" and maxCount = 25

    5. I also created a rule for the dropdown that runs when field changes that query's the data connection "GetMembersOfGroup".

    What am I doing wrong?

    Ernesto thank you for all your help on this,

    Steven

  • 12-30-2011 12:13 PM In reply to

    Re: GetMembersOfGroup dropdown

    Hi - you ask what you are doing wrong, but I'm not sure what the issue currently is - is your drop down blank?

    Try dragging your data fields from GetMembersOfGroup onto your form and preview - that way you can see if there are any results being returned.

    Sometimes I also put the query fields on the form and a button to run the query - that way I can experiment a bit and figure out where my syntax may be awry.

    Hilary Stoupa

  • 01-03-2012 06:50 AM In reply to

    Re: GetMembersOfGroup dropdown

    Hilary, thank you.

     

    Yes the drop down is blank.  I have followed the instructions in the user’s guide for the GetMembersOfGroup method and successfully created test form that pulls the information into the form when queried with a button.  So I know the method is working. 

     

    In the same form I am now trying to create a drop down that only returns the users of a single group, in this case our AD group for Sales.  If you take a look at the steps above you will see what I did but the results are that the dropdown is blank.   

  • 01-03-2012 09:11 AM In reply to

    Re: GetMembersOfGroup dropdown

    Yes, I read the steps in your post. So, if you put the secondary data source for GetMembersOfGroup back on your form again, and preview the form and make sure the query runs, can you verify that there are entries with a groupAlias = SalesGroup? With the same case?

    I also don't understand step 5 - you are re-running the query that provides values for the dropdown based on changed data in the field bound to the dropdown?

     

    Hilary Stoupa

  • 01-03-2012 09:37 AM In reply to

    Re: GetMembersOfGroup dropdown

    I never removed the secondary data source. And yes I have verified that there are entries with a groupAlias= SalesGroup. 

    Step five was just the addition of a rule to the drop down control...

    •      Condition: None - Rule runs when field changes
    •      Rule Type: Action
    •      Run these actions: Query using data connection: GetMembersOfGroup

    Please pardon my frustration but it seems that it would not be so hard to create a drop down that only returned the members of a group.  Could you outline the steps you would take to do this?

    Thank you, 

  • 01-03-2012 10:08 AM In reply to

    Re: GetMembersOfGroup dropdown

    Hi - sorry about the confusion. The GetMembersOfGroup method already has a groupAlias parameter that you set when you create the data connection and/or via a rule. It should already return the members of the group that you specify in that parameter. In your Step 4, how are you "filtering"? I don't think you'd need to add filters in the dropdown control itself - is this what you have?

    Mel Clemente
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 01-03-2012 10:49 AM In reply to

    Re: GetMembersOfGroup dropdown

    Hello!

    You are correct that you do not have to filter the dropdown.  And you are correct that the parramiters for the method are groupAlias AND maxCount.  I figured out that if I created a rule that populates these two fields (veriables) when the form loads and set the Data Source for the dropdown to GetMembersOfGroup.  The dropdown is automaticaly populated with the group members set in the groupAlias veriable on loading the form.  So if on load the veriables for the GetMembersOfGroup are set to groupAlias: SalesGroup and maxCout: 99, then the dropdown is populated with the names of the members in the SalesGroup.  This works!!! 

    But it also sets the veriables for any other dropdown where that method was used.  So all the dropdowns that use GetMembersOfGroup is used as a data source are populated with the members of the SalesGroup. 

    Now my problem is that I have several dropdowns that need to be populated with the members of different groups. I have two more dropdowns in the form that I need to populated, one with the members of our Tech group and aother with our members of our SalesEngineers group.   

    And thank you for your responce,

    Steven

  • 01-03-2012 11:15 AM In reply to

    Re: GetMembersOfGroup dropdown

    The quickest way is to add a GetMembersOfGroup data connection for each group being used.  Otherwise you will need to copy the GetMembersOfGroup results to another location before it is used to get the members of the second group.

  • 01-03-2012 12:34 PM In reply to

    Re: GetMembersOfGroup dropdown

    I never thought of adding a data connection to the same data source more than once.  Its so simple!  Thats Brilliant!!!

     Thank you!

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