Set Submitter Group Membership - InfoPath Dev
in

InfoPath Dev

Set Submitter Group Membership

Last post 02-24-2012 11:09 AM by ErnestoM. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-20-2012 08:29 AM

    Set Submitter Group Membership

    We are using Qdabra AD web service. I can easily get the groups for the current logged in user, and can even fix the name of the submitter and the submitters manager. I now want to know how to set the submitters group memberships using the same service.
  • 02-21-2012 09:04 AM In reply to

    Re: Set Submitter Group Membership

    The Qdabra AD web service is read-only.  You can get group memberships using GetGroupsForUser, but you cannot edit the Active Directory using the web service.

     

  • 02-21-2012 09:23 AM In reply to

    Re: Set Submitter Group Membership

    I dont think thats what I am asking to do,

    what I am asking is to query the groups for user in my Infopath form (which I know how to do), then as with setting the submitters name into a field in my form along with the submitters manager, I want to be able to fix the groups that the submitter belongs to into the form, so that the next time the form is opened, it will still show the groups that the submitter is a member of, as weel as the submitter name and submitter manager name (both of which I already have)

  • 02-23-2012 08:10 AM In reply to

    Re: Set Submitter Group Membership

    Hi-

    You could call GetGroupsForUser, which returns a list of the groups that the user belongs to. Then you can set your field(s) in the main data source to the values returned by the GetGroupsForUser web service.

    Is that what you're looking to do? Let us know.

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


  • 02-23-2012 08:20 AM In reply to

    Re: Set Submitter Group Membership

    I have connected the get groups for user and I can return the users groups, but the gorups change when the form is opened by someone else, it is always referring to the current users groups, I want to make it so that it retains the gorups of the first person to open the form and submit it, regardless of how many people open from there after. is there a way to fix this, I can retain the name of the submitter, even the submitters manager, but i dont know how to fix the group memberships.
  • 02-23-2012 09:06 AM In reply to

    Re: Set Submitter Group Membership

    I think the problem can be solved via form logic. For example, let's say I have a "originator" field in my main data source. I have a data connection calling GetMyInfo. I have rules on load which query GetMyInfo and then set the field(s) for "originator", but I set a condition to only execute this action when the form is new.

    The same thing applies for your groups data connection. You don't want it to execute on load (so make sure to uncheck the checkbox in the data connection wizard). You only want the data connection to execute once, when the form is created, and not every time the form opens (just like your other data connection, which is getting the user's other information).

    Does that make sense?

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


  • 02-23-2012 09:23 AM In reply to

    Re: Set Submitter Group Membership

    It does, but I dont want to restrict it either way, I still need to get the groups for the logged on user, but I aslo need to get the grousp for the submitter, hence the need to fix it in a field as with the submitters name and manager, I still get the logged on users name and manager, but have fields that fix the submitter name and manager.

  • 02-24-2012 11:09 AM In reply to

    Re: Set Submitter Group Membership

    Hi,

    The data connection is going to return the user info for whichever user you query for, but your form will need conditions to know when to execute the data connection for the "form creator" or for the "current user". You'll also need fields in your main data source where you can store the results of the data connection. So it all comes down to form logic, which unfortunately is a little difficult to discuss/design via the forum.

    For example: I could have one data connection called GetMyInfo, and this sets a node called "CurrentUser" every time the form loads. But I can also have a data connection called GetCreatorInfo (which also uses the GetMyInfo method) but it only executes when the form is new and sets a node called "FormCreator". The data connections are doing the same web service call but they are going to execute at different moments (conditions) and the result is going to be used in different fields (rules). The same idea would apply to any of the methods in the Active Directory web service.

    I don't know the details of your license/purchase, but feel free to contact us via support at qdabra dot com if there was support included in your purchase. If you'd like us to take a look at the form and help you with the necessary form logic, we also offer one on one support consultations.

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


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