How to merge all name field items in a group

F

fbartrom

I have a group called "TeamMembers". In that group I have a string field
called "UserName" I have a field that is not in that group called "UserList"

How do I create a rule that merges or concatenates all the "UserName" items
in the "TeamMembers" group into the "UserList" field?

The rules I have created so far only return the first "UserName" item in the
group.
 
S

S.Y.M. Wong-A-Ton

The easiest way to do this is through code, since it's more flexible and you
can merge/concatenate the UserName fields however you want. Having said this,
when is the UserList field filled? That is, where did you put the rule to
fill this field?
 
F

fbartrom

I have a command button that creates a document workspace using the DWS web
service in SharePoint. I was planning for one of the rules on this command
button to perform the concatenation of the UserName fields. I want to do
this because one of the options on the web service that creates the document
work space is to pass it a user list string so the newly created site will be
populated with the members. I need to be able to to concatenate the
usernames with some additional formatting into a single string to pass to the
web service. The additional formatting is not a problem. I am not having
success concatenating the UserName fields.
 
S

S.Y.M. Wong-A-Ton

I don't know of any InfoPath or XPath function that can concatenate strings
over a node-list, just like the sum() and avg() function can do for numbers.
Unless the amount of members is static, i.e. you always have e.g. 10 members
in the list, I cannot think of any other way to do it than through code. Is
the amount of members static or does the amount vary?
 
F

fbartrom

The amount of members will vary.

S.Y.M. Wong-A-Ton said:
I don't know of any InfoPath or XPath function that can concatenate strings
over a node-list, just like the sum() and avg() function can do for numbers.
Unless the amount of members is static, i.e. you always have e.g. 10 members
in the list, I cannot think of any other way to do it than through code. Is
the amount of members static or does the amount vary?
 
S

S.Y.M. Wong-A-Ton

In that case, the only option I see right at this moment is to code it:
Retrieve the group node for the members and then loop through all the child
nodes and concatenate the user names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top