none
InfoPath - Cascading users?

    Question

  • Hi,

    Is it possible to have some cascading effect over a user lookup field?

    Here is the scenario : I have Projects and Actions.

    Each project is defined by a couple of group including "managers".
    Each action is linked to a project and has a field "manager"

    I want my users to have no choice but to complete the "manager" field with users from the Project's managers of the action they are creating.

    Is it even possible? I don't seem to find anything on the subject, and user fields seems to be kinda strict where the usual dropdown fields have a lot of option to customize them.

    Worst case scenario might be to retreive all the members of the groups, have the user select the manager from a dropdown list, and then use his choice to fill an actual user lookup field maybe...

    How would one go about this? I'm taking any ideas !

    Wednesday, January 11, 2017 9:53 PM

Answers

All replies

  • Hi Zelarith,

    I think your solution is necessary, as you cannot know who is the manager in a group. You need to get all members for each group and then select the manager from the members. After that, set the user field with the selected manager.

    Best Regards,

    Victoria

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, January 12, 2017 9:24 AM
    Moderator
  • I think there's a misunderstanding : I don't want my application to know who is the manager of a given group, I want my application to know wich is the group of "managers" as defined in my "project" list.

    Each of my project items have a required "managers" field that is a group or a person.
    Say the project "Project 1" has its field "managers" set to the Sharepoint group "Managers 1" made up of two people, "Georges" and "Steeve".

    When I create a new action, I have to select a project. I select "Project 1". Now I have a "managers" field to complete. It's a person lookup field, and I want it to allow me to select people from the managers field of that project, i.e. either Georges or Steeve, no one else.

    I've found I can ask Sharepoint to restrict the values of a "person lookup field" to the people of a given group instead of allowing any user, but that method asks me to hard 'code' the group name, I want to dynamically restrict a "person lookup field" to the people of a group (with the group being defined when the project is selected, hence the use of the word "cascade in my question title)

    • Edited by Zelarith Monday, January 16, 2017 10:38 AM
    Monday, January 16, 2017 9:49 AM
  • Hi Zelarith,

    If you want to show all the users inside the group in Manage field, then you can use UserGroup.asmx web service in InfoPath.

    https://sharepointrookie.wordpress.com/2008/03/25/get-user-collection-from-a-sharepoint-group/

    Best Regards,

    Victoria


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by Zelarith Wednesday, January 18, 2017 4:10 PM
    Wednesday, January 18, 2017 2:33 AM
    Moderator