How can I check in an InfoPath form whether a user exists in the SharePoint Portal?

I am creating a form inside InfoPath, which should be integrated into the SharePoint 2007 portal. This form will have a text box in which the user can enter the Person Name.

How can I check if this person exists or not?

Instead of checking the user, is there a way to populate the drop-down list with all the portal user names? (the reason why users from Active Directory may be)

+3
source share
6 answers

, , SharePoint InfoPath ( SharePoint SharePoint Forms Service MOSS Enterprise), - SharePoint - , - .

+1

Contact Selector ( ActiveX). MSDN-, , InfoPath , .

-, - .

+1

- ASP.NET, Sharepoint "" . , .

0

, , SharePoint. , . InfoPath, GetUsersFromSP. :


string ADName = System.Environment.UserName;
        IXMLDOMDocument3 UserQuery = (IXMLDOMDocument3)thisXDocument.GetDOM("GetUsersFromSP");
        UserQuery.setProperty("SelectionNamespaces",
            "xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\" " +
            "xmlns:tns=\"http://schemas.microsoft.com/sharepoint/soap/directory/\"");

        ((WebServiceAdapterObject)thisXDocument.DataAdapters["GetUsersFromSP"]).Query();

        IXMLDOMNode Users = UserQuery.selectSingleNode("//dfs:myFields/dfs:dataFields/tns:GetUserCollectionFromSiteResponse/tns:GetUserCollectionFromSiteResult/tns:GetUserCollectionFromSite/tns:Users");

        foreach (IXMLDOMNode current in Users.selectNodes("tns:User"))
        {
            string Login = current.attributes.getNamedItem("LoginName").text;

            Login = Login.ToUpper();
            if (Login.EndsWith(ADName.ToUpper()))
            {
                thisXDocument.DOM.selectSingleNode("my:root/my:config/my:User").text = current.attributes.getNamedItem("Name").text;
                break;
            }
        }
0

, , SharePoint

http://blueinfopath.blogspot.com/2008/10/how-to-populate-list-with-sharepoint.html

I want to check, - Make a text field - Add a button, name it ValidateUser - Create a connection to receive ... - ValidateUser access rules - Add a text field to the AccountName field in Secondary Datasource - Make a receive connection - Get the value of the Value field with the Name filter = "PreferredName"

This work for Infopath Form Services Check it out and type UserLogin in the text box and press the confirm button

Frederick

0
source

Source: https://habr.com/ru/post/1699409/


All Articles