How do I set the value for a People Picker/Group Picker? RRS feed

  • Question

  • I'm not sure what datatype a people picker is... string doesn't work. 

    How do I set the value? Sorry I'm a really newbie on this object model...

    public void Button1_Clicked(object sender, ClickedEventArgs e)
                // Write your code here.
                //scripts to get value of Infopath field
                string myXpath = "/my:myFields/my:Category";
                //scripts to set value of Infopath field        
                XPathNavigator P2 = this.MainDataSource.CreateNavigator().SelectSingleNode(myXpath, this.NamespaceManager);
                P2.SetValue("This is sample of String");

    Wednesday, March 20, 2013 8:39 PM


  • DataType is string and its value is either 'User' or 'Group'.

    Not sure about the code though ;)


    Sergio Giusti

    Whenever you see a reply and if you think is helpful, click " Alternate Text Vote As Helpful". And whenever you see a reply being an answer to the question of the thread, click " Alternate Text Mark As Answer".

    Thursday, March 21, 2013 9:49 AM