开发者

Assign value to People Picker programatically in Infopath

As we can assign any field in infopath form using (Eg:TextBox)

    MainDataSource.CreateNavigator().SelectSingleNode("//my:RequestedHardware",
 NamespaceManager).SetValue("Test");

But when i am assigning the same f开发者_如何学Goor the PeoplePicker field it is giving an exception means which we can't add the value like this. Please suggest how can we programatically do this.... Thanks


How are you setting the value ? Contact selector control requires three values to be set as shown below

  1. gpManager/Person/DisplayName = PrinciplaInfo/DisplayName
  2. gpManager/Person/AccountId = PrinciplaInfo/AccountName
  3. gpManager/Person/AccountType = "User"

Make sure you are setting all three values.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜