Despite reading lots of
forum posts, several blog posts (incl. the informative walkthrough from alec
pojidaev on codeless programming), I find myself needing your expertise..
I
simply cannot get the double eval trick to work when using the people picker in
Infopath 2010.
(I can get
it to work with a repeating table though, just not the people picker).
What I want
to accomplish:
Concatenate
the AccountId’s of users selected in the people picker, separated by
semi-colon, like this:
domain/user1;domain/user2;domain/user3
What I’ve
done so far:
Created a
blank infopath form with the following structure
myFields
Picker
pc:Person
DisplayName
AccountId
AccountType
strAccountIds
Where ‘Picker’ is the peoplepicker and strAccountIds is a text box where
I would like the concatenated string to appear.
When I enter the following in Edit Xpath mode:
xdMath:Eval(xdMath:Eval(../my:Picker/pc:Person, 'concat(my:AccountId,
";")'), "..")
it results in the following:
eval(eval(Person; 'concat(my:AccountId, ";")');
"..")
and returns this error:
“"../my:Picker/pc:Person/my:AccountId" does not point to a
valid location path of a field or group.”
When I use ‘Insert
Field or Group’ to select the AccountId field, this is what is generated in
Xpath-mode:
xdMath:Eval(xdMath:Eval(../my:Picker/pc:Person,
'concat(../my:Picker/pc:Person/pc:AccountId, ";")'), "..").
I have read in other posts that the reference to AccountId must be relative but I can't seem to find the correct relative reference.
I think it is the 'pc:' before AccountId that confuses me.
Hope someone can help me or point me in the right direction.