Infopath codeless programming (walkthrough) 1
Special thanks: Karl D. Swartzendruber and all participants of following discussion:
http://www.infopathdev.com/forums/p/10098/35969.aspx#35969
Other parts: 2, 3.
Bookmark that post
Let me guess what might have brought you to that blog page about codeless programming in InfoPath. Any of you who developed at least one sophisticated InfoPath form sooner or later have been realized that writing forms with real complex behavior is impossible without some sort of coding in C# or VB.NET. So developers have no choice but to deal with mixed developing environment like Visual Studio, managing form security levels, security certificates and so on. But there are people who like to keep things simple. At least I do. And that’s why probably you are reading that page too:)
Anyway, lets get to the business. How to iterate an Infopath Repeating table?
Here is our scenario: we have a repeating group on the form which will be populated with wonderful (but often overlooked) Contact Selector Control with some user information. The control provides us all necessary information about user except his email.
But wait, that is outrageous! The email was the only reason why we decided to use that now not so awesome control! Well… at least we have access to the web service which able to return user email in exchange of account name. There are countless blogs describing how to utilize UserProfileService to get info of a single user in Contact Selector. Here I’ll try to demonstrate how to deal with multiple selection in Contact Selector. So now our task is clear – we have to construct a string acceptable in Email address field iterating through repeating group and submitting query to the web service on each cycle of iteration.
Let’s go.
The first things first – here using-the-contact-selector-control you will find detailed explanation how to utilize Contact Selector Control. The resulting data structure for the control in main data source should look like this

The Control also requires secondary data source

Add text field named HlinkToEmail. That field will hold result of our computations. Resulting Main Data Source:

When your new shiny control starts providing you users from your network that means we are ready for the web service part. Here we’ll use SharePoint GetUserProfileByName web method. You will need SharePoint Services running somewhere on your network. That part is pretty straightforward. Add secondary web service receive connection. Your link in connection settings should look like
http://<youservername>/_vti_bin/UserProfileService.asmx.
The results of that part:

“Programming” part
Place a button on the layout. At Rules and Merge tab create rule named setfCounter. Press “Set Conditon”. In the first area choose “The expression”. Here is string to paste in second area:
count(my:Person)>0
The only action will assign initial value to the HlinkToEmail field. Press fx button at new action form. Check “Edit XPath (advanced)” checkbox. To avoid too detailed instructions of choosing functions and form elements just copy paste the following expression:
xdMath:Eval(xdMath:Eval(my:Person, ‘concat(my:AccountId, "|")’), "..")

At main data source pane double click at HlinkToEmail field. At Rules and Merge tab create rule named fConterRule. It’s a conditional rule. In the Set Condition dialog in the first area: Choose The expression. Then paste this expression into second area:
contains(., "|")
The resulting set of actions:

The rule will consist of 3 actions. The fist action will be setting AccountName field of data source named GetUserProfileByName to the portion of HlinkToEmail field. Check “Edit XPath (advanced)” checkbox. Paste Xpath expression:
substring-before(., "|")
Next is self-explanatory action. Add action -> Query using data connection -> Choose GetUserProfileByName.
Add the last action to set HlinkToEmail field to the new value by assigning following XPath expression:
concat(substring-after(., "|"), ";", xdXDocument:GetDOM("GetUserProfileByName")/dfs:myFields/dfs:dataFields/s0:GetUserProfileByNameResponse/s0:GetUserProfileByNameResult/s0:PropertyData/s0:Values/s0:ValueData/s0:Value[../../../s0:Name = "WorkEmail"])
We done with actions of that rule. Make sure that check box “Stop processing rules then this rule finishes” is checked.
Add the last rule right after fConterRule. In Set Condition dialog choose The expression. In expression area copy paste:
substring-before(., ";") = "" and contains(.,";")

And finally, set the HlinkToEmail to the following XPath expression:
substring-after(., ";")
That’s it.
P.S. Now you know how to iterate and read repeating structures. But what if you need to write? Well, InfoPath doesn’t provide UI to parameterize repeating structures are assigned to new values. Still here you will find a workaround which overcomes this limitation.
Posted under tags: MOSS Contact Selector Control Infopath Sharepoint
December 18, 2008 at 2:20 am
Good stuff – glad we were all able to work together to improve this solution and come up with a way to do it for InfoPath-only emails and for using SPD workflows to send the emails. Have you considered splitting it into those two sub-categories? The way I’m doing it for SPD is unbelievably simple compared to these steps, although yours are excellent.
December 18, 2008 at 2:50 am
Special thanks part is at the top and updated :) Sending emails in workflow is a good and legitimate practice. But my initial goal was just to show how “state automates” programming principles could be applied bringing significant advantages such as easy of deployment. After all 3 rules and 5 actions is not that big amount of work. :)
December 18, 2008 at 1:39 pm
hi,
I am using Contract Selector to send an email to selected personals and/or groups. it works if we select persons in contact selector but not for groups! Any idea???
December 18, 2008 at 6:51 pm
There is SharePoint service which returns all members of a given SharePoint group. There are also bunch of Exchange server webservices (not tryed them yet). Getting information directly from AD will require to write custom webservice. Anyway combining web service data with that solution will allow to solve your problem.
January 5, 2009 at 2:01 pm
Is there a way to send an email to the manager of the person’s name in the contact selector?
January 5, 2009 at 3:31 pm
To: Nick
Shouldn’t be a problem. For example if you’ll replace “WorkEmail” with “Manager” in the main action like this:
concat(substring-after(., “|”), “;”, xdXDocument:GetDOM(“GetUserProfileByName”)/dfs:myFields/dfs:dataFields/s0:GetUserProfileByNameResponse/s0:GetUserProfileByNameResult/s0:PropertyData/s0:Values/s0:ValueData/s0:Value[../../../s0:Name = "Manager"])
you will get concatenated string of managers AD accounts. Applying same method to the resulting string again you will get managers emails. In between those 2 steps you will need to replace separator from “;” back to “|” with ‘translate’ function to make it work.
When you will have better understandiing of how does it work you will be able to fit everything in one rule.
February 26, 2009 at 4:35 pm
Well written post. It’s nice to see more people using InfoPath’s built in functionality without resorting to code right away. :)
March 2, 2009 at 1:04 pm
Great post. It works perfectly for me. One question though, have you tried setting this up to work with two Contact Selectors on a form pulling in the profile information for two different users? I’m trying to get that to work but the second set of fields always pulls the first set of profile data.
If you have any ideas that would be awesome!
March 2, 2009 at 1:09 pm
I had no problems with multiple Contact Selectors. Probably you need to reference the structure of 1st CS in the 2nd.
March 11, 2009 at 2:40 pm
I have tried this solution and got it to work perfectly in my test environment. When I published it to the production server, though, everything went to hell. I have some users who even farm administrators cannot retrieve the email for, and other users who aren’t administrators can’t retrieve ANYONE’s email? I have searched for information on security and permissions for the userprofileservice.asmx, and can’t find anything about this at all.
The error message I get in all these instances is:
The query cannot be run for the following DataObject: GetUserProfileByName
InfoPath cannot run the specified query.
The SOAP response indicates that an error occurred:
A user with the account name DOMAIN\username could not be found. —> User Not Found: Could not load profile data from the database.
The production server is part of an enormous AD forest, with over 300K users, but I’ve found 2 users so far that nobody can retrieve a profile for, even though they’re members of the sharepoint site collection and have a profile.
March 11, 2009 at 3:00 pm
It’s understandable why admins are having problems. It’s because they recognized as SystemAccount and there is no such record in AD or user profile database.
I dont know what causing your problem. Over all it doesn’t look like InfoPath specific problem. The only suggestion I have is to convert UserProfile connection and then navigate to Connection library and approve resulting *.udcx file.
April 1, 2009 at 11:37 pm
Hi,
I’ve used this control and it works great. My challenge is that I need 2 of these controls in my form. I could achieve this by creating the “gpContactSelector” in a repeating group, but I don’t want the users to add more than 2. Is this possible? How?
Thanks!!!
-IA
April 2, 2009 at 1:24 am
I dont think its reasonable to create repeating group for 2 repeating elements. If your second control is optional you could put it in a section and apply conditional formatting (hide/unhide) in responce of an user action.
April 2, 2009 at 7:17 am
Hello Alec,
I guess I didn’t explain the situation very well. Basically, I need to have a Contact Selector for “Employee”, and one for “Manager”. An alternative would be to automatically pull the employee’s manager from AD (but have not explore that option yet).
So, for this I followed the instructions mentioned in the blog: http://blogs.msdn.com/infopath/archive/2007/02/28/using-the-contact-selector-control.aspx (see Oct 08, 2007), it says that you can have multiple Contact Selector fields by having a repeating group, but it does not limit the number these fields, and I only need 2. I tried to have another instance in my datasource but didn’t work because I must maintain the names of the fields, otherwise I believe it does not work.
Any guidance on resolving my needs (1 employee, 1 manager in separate fields) would be much appreciated.
Thanks!
-IA
April 2, 2009 at 1:15 pm
Follow instructions in my blog but instead of “WorkEmail” use “Manager” it will give you manager data (managers login name).
April 9, 2009 at 9:39 am
I’ve tried this solution and it worked great while using it with infopath.
But I’ve some problems publishing the form to MOSS with office forms server. When I try to select a Person, the HlinktoEmail only shows the email of the user that is currently logged on to MOSS – not the one that I’ve selected in contact selector…
Can somebody please tell me what’s going wrong??
Thanks
Stefan
April 9, 2009 at 1:13 pm
Never have expirienced that kind of problem before. It works fine in MOSS for me. Just make sure you moved all actions from Contact Selector to any other control.
April 16, 2009 at 7:40 pm
I completed these steps, but I don’t get any different results with my people picker than before. I have my people picker on the form and immediately afterwards I placed the HlinkToEmail text box. Am I supposed to see the associated e-mail address in the text box? I need to be able to determine if the contact selected has an associated e-mail address (because our AD has some with and some without.
FYi, I’m not a programmer. I was successful in creating 2 separate people pickers on the same form, but now I need to insure there are related e-mail addresses attached to the user’s selections. I’m sure either I did something wrong, or I’m expecting something to happen that wont. The only difference I see is when I say set the HlinkToEmail field to a new value – because I’m already in that field, the rsulting formula only shows a “.” to indicate the field is the same. Thank you in advance. DAP
April 16, 2009 at 8:07 pm
To: Donald
>Am I supposed to see the associated e-mail address in the text box?
Yes.
The “.” is supposed to be in the fields name. It means “self”. Then in the formula field you have to paste Xpath expression.
April 16, 2009 at 8:28 pm
I pasted the Xpath expression in to begin with and then InfoPath reformats it somehow to what it likes. If I click the xPath check box the formula changes back and forth to the xPath formula and a simplified version InfoPath determines. Is there something else I can check? I went back and reviewed your instructions again and all seems well – just doesn’t give me an e-mail address. I deliberately pick a contact that has one listed, to ensure I get the desired results.
April 16, 2009 at 8:49 pm
So what exactly you are getting in HLinktoEmail field after choosing a person?
April 16, 2009 at 8:55 pm
I’m getting the same results as Stefan. I published the browser-enabled form to my MOSS site. When the form is displayed in InfoPath, HlinkToEmail shows the email addresses for the Person names entered. When the form is displayed via the form server, HlinkToEmail shows the logged on user. This is a simple form with just the Contact Selector and HlinkToEmail fields.
April 16, 2009 at 9:01 pm
To Mike:
Have you moved all actions from Contact Selector to any other control?
April 16, 2009 at 9:04 pm
No. Does it matter which control I move them to?
April 16, 2009 at 9:09 pm
Any control will work (exept Contact Selector). The XPath will differ a bit:
xdMath:Eval(xdMath:Eval(../my:replyToControl/my:Person, ‘concat(my:AccountId, “|”)’), “..”)
April 17, 2009 at 12:07 pm
I don’t get anything in the HlinkToEmail field. Not only that, but I can’t even click in the HlinkToEmail field to manually enter anything (not that I want to, I just find it odd – it acks like a read-only field). Keep in mind that I can also enter multiple contacts, even though I made the 3 sub fields non-repeating. I can send screen shots via e-mail if needed.
April 17, 2009 at 6:57 pm
Everything looks correct. The only problem is your formula. Try to make it work with any repeating structure. There is alot of info on internet discribing in much better way than I did how to use double eval.
April 17, 2009 at 7:01 pm
What is this double eval trying to do? I may be able to get it to work if I know what HlinkToEmail is expecting to receive to further process the data.
April 17, 2009 at 7:05 pm
It should return concatenated string of AccointId’s in form of:
domain\user1|domain\user2 …domain\user10| .The last symbol should be “|”
April 30, 2009 at 5:08 am
Thanks for the great tutorial! I’m also having trouble when publishing my form as browser enabled (same as Mike and Stefen). I’ve even transfered the actions from the contact selector group to a field on my form. Do you mind posting additional details or tutorial on how you got it to work? Any help greatly appreciated!
April 30, 2009 at 1:03 pm
To Dennis:
What exactly is your problem?
May 1, 2009 at 12:46 am
When I preview as an infopath form, the contact selector works as it should, pulling the email of the person selected. Once published to sharepoint (browser enabled), a person is searched and selected but grabs the email of the person using the form (different from the person selected). As suggested in one of the post, I’ve even transfered the rule and all the actions from the contact selector to a field on the form and still no luck. Any guidance, examples, or even additional screen shots is greatly appreciated. Thanks for your time.
May 1, 2009 at 1:25 pm
To Dennis:
> I’ve even transfered the rule and all the actions from the
> contact selector to a field on the form and still no luck.
Please be specific. What do you mean when you saying “no luck”? What happened when you pressed/typed in control you’ve transferred actions to?
May 28, 2009 at 6:54 pm
Side question – where is this ‘coding’ information documented?
For example, “xdMath:Eval(xdMath:Eval(my:Person, ‘concat(my:AccountId, “|”)’), “..”) ”
xdMath? Eval?
May 28, 2009 at 7:36 pm
Good question. I did a small research myself and, to my amusement, found nothing on Microsoft MSDN site (although there are few examples which uses that namespace).
If you will find more info please post it here. Looks like it’s a good reason to solicit Microsoft to fix that gap in documentation.
June 10, 2009 at 6:50 am
Thank you for this stuff, here was two issues I’ve search for a while and it helps a lot for my current bussines project.
It’s an amazing beautyful concept. I mean codeless programming by InfoPath.
June 26, 2009 at 5:04 pm
Has anyone successfully move all three rules to a control (like a button control) before?
I am trying right now and i can’t get pass the expression:
xdMath:Eval(xdMath:Eval(../my:gpContactSelector/my:Person, ‘ concat(my:AccountId, “|”)’), “..”)
Error said:
msxml5.dll
Reference to undeclared namespace prefix: ‘my’.
Error occurred during a call to property or method ‘Eval’.
Love to hear from the experts
June 26, 2009 at 5:30 pm
xdMath:Eval(xdMath:Eval(my:replyToControl/my:Person, ‘concat(my:AccountId, “|”)’), “..”).
Your XPath is incorrect as for a button.
June 26, 2009 at 6:29 pm
It seemed to run but my HlinkToEmail textbox return empty eventhough my selected 3 names in the contact selector.
Here is my setfCounter rule:
xdMath:Eval(xdMath:Eval(my:gpContactSelector/my:Person, ‘concat(my:AccountId, “|”)’), “..”)
Here is my fCounterRule:
concat(substring-after(., “|”), “;”, xdXDocument:GetDOM(“GetUserProfileByName”)/dfs:myFields/dfs:dataFields/s0:GetUserProfileByNameResponse/s0:GetUserProfileByNameResult/s0:PropertyData/s0:Values/s0:ValueData/s0:Value[../../../s0:Name = "WorkEmail"])
did you do something wrong?
June 26, 2009 at 6:33 pm
one more time:
http://s11.photobucket.com/albums/a189/nguyendd/?action=view¤t=Rules.jpg
June 26, 2009 at 7:03 pm
That won’t work.
The only action you need to move to the button is with eval function. The other rules has to stay where they are – at field control.
June 26, 2009 at 7:24 pm
Well i left the frist rules there for the button and move the bottom two rules to the HlinkToEmail textbox field and the result still the same nothing on the textbox field when i click the button.
June 26, 2009 at 7:31 pm
Make both rules on the field disabled to see if string of users properly populated by the button rule.
June 26, 2009 at 7:42 pm
I took the 2 rules from the HlinkToEmail textbox field away and the result still empty. so there is something with my first rule.
Condition of the first rule set to:
Condition:
count(my:Person)>0
Actions
Set a field’s value: HLinkToEmail=xdMath:Eval(xdMath:Eval(my:gpContactSelector/my:Person, ‘concat(my:AccountId, “|”)’), “..”)
with Edit XPath (advanced) check box checked.
June 26, 2009 at 8:01 pm
Check if anything is wrong with condition. Remove it from button rule.
June 29, 2009 at 2:43 pm
I tried to debug through your example and i notice that i have twice the list of email addresses and when i trace back to the rule that use for the contact selector control i notice i got the list of AccountId listed twice and therefore the email address listed twice. I can’t seem to explained why?
Here is the rule used in my contact selector control:
eval(eval(Person, ‘concat(my:AccountId, “|”)’), “..”)
June 29, 2009 at 3:09 pm
That means the event fires twice. But if you have moved all rules from contact selector to a button that kind of thing shouldn’t happened.
June 29, 2009 at 3:27 pm
I could not get the button to work. I would like to clarify a few things:
As i understand there were total 3 rules mentioned in your example (setfCounter,fConterRule and RemoveChar) setfCounter rule used in the contact selector control and the other 2 rules used in the HLinkToEmail textbox. So i added a button and moved the setfCounter rule from the contact selector to the button. The other 2 rules stay with the HLinkToEmail textbox. Am i correct so far? When moving the setfCounter rule to the button i made the change according to some of your reply this past Friday as follow:
eval(eval(my:gpContactSelector/my:Person, ‘concat(my:AccountId, “|”)’), “..”)
That is where i am at. When i try to run it after selecting all names and click the button i got nothing in the textbox.
June 29, 2009 at 4:01 pm
You getting nothing in textbox when rules on textbox desabled(unchecked) or with both rules checked?
June 29, 2009 at 4:07 pm
I got nothing regardless whethere there are rules in textbox or not. I think the setfCounter rule doesn’t work. I am suspecting of the condition for the setfCounter rule. I could not get it to say:
Condition:
Number of occurrences of Person > 0
Here is mine:
Condition:
count(my:Person)>0
June 29, 2009 at 6:21 pm
Ok. Just remove the condition then.
June 29, 2009 at 7:39 pm
Finally i got it to work with condition applied. but the only problem i saw was that the some of the AcountId were not resolved to the approriate email.
Here is the list of accountId (which is correct)
MyCompay\dn978|MyCompay\mbs42|MyCompay\sag47|
Here is the list of email:
MyCompay\sag47|;DVNGUYEN@MyCompay.ORG;MSTOUT@MyCompay.ORG
As you can see, the last AccountId was not resolved and the warning/error was:
[IMG]http://i11.photobucket.com/albums/a189/nguyendd/error2.jpg[/IMG]
June 29, 2009 at 8:03 pm
It should be configuration problem. It’s hard to say what it could be.
June 29, 2009 at 8:08 pm
worked on Some AccountId’s and did not work on some others. Do you have any tips as where to look this kind of configuration problem? This blog is great and i learned so much.
June 29, 2009 at 9:07 pm
Log as user you having problems with and call GetUserByName method. See what you get.
Sharepoint admins having problems with thier emails quite often too.
July 1, 2009 at 8:48 am
Hi Alec, Got one problem, when performing the step xdMath:Eval(xdMath:Eval(my:Person, ‘concat(my:AccountId, “|”)’), “..”) , it gives an error with the formular. I’m very new to this so prob missing something small. Any advice? Bellow is a copy of the error.
Unexpected character.
xdMath:Eval(xdMath:Eval(my:Person, –>‘<–concat(my:AccountId, "|")’), "..")
Thanks
July 1, 2009 at 1:20 pm
That’s really simple. That symbol you having trouble with designated to indicate single quot. However the symbol itself is not a single quot. So just delete it and replace with real single quot symbol.
July 2, 2009 at 1:47 pm
THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thought it was something simple……….
July 1, 2009 at 1:49 pm
Yes you were correct and i have found that to be the problem as well. One side affect that i have seen was that eventhough if i did not enter any name in the contact selector control the HLinkToEmail still list one email address which is email address of the person with the current logged-in account id. I looks like the condition for the contact selector rule: Number of occurences Person >0 did not execute correctly.
I was trying to create a template part for this contact selector control since i am using quite often in my forms but it seem that it is not doable since the control is always disabled in the template part design mode. Do you know if it is posible to that? i can’t seem to be able to add the control to a template part.
July 1, 2009 at 1:55 pm
Well.. I never used templates parts so I can’t help you here. I would be interested in final results of your attempts though. Please post here if you were succeseful.
July 1, 2009 at 9:33 pm
Thats how it should be. Initially group always have one node so check will be always be true unless you will delete that initial node manually. The condition serves to prevent to fire the event wich will errors out without that condition.
July 1, 2009 at 1:57 pm
One side affect that i have seen was that eventhough if i did not enter any name in the contact selector control the HLinkToEmail still list one email address which is email address of the person with the current logged-in account id. I looks like the condition for the contact selector rule: Number of occurences Person >0 did not execute correctly.
Have you seen it?
July 8, 2009 at 8:06 pm
I’m getting the same results…. no matter how many people I select in the contact selector I get one email resolved, the email of the current user.
July 8, 2009 at 8:29 pm
Have you moved the rules from Contact Selector to the different control?
July 8, 2009 at 8:31 pm
i have seen the same issue and when i moved the rule from contact selector to a button it worked.
July 8, 2009 at 8:33 pm
And the condition of this rule should say:
Number of occurences of Person > 0
July 15, 2009 at 12:10 pm
By the way, can this control be adaptive to different situation? I have a need to allow the user to select multiple item in the dropdown list box in my form, since multiple selection list box is not supported in browser-enabled, can i adapt this contact selector for that situation? if not is there a work around with my situation? thank you in advance
July 15, 2009 at 3:41 pm
The workaround is not that complex. Use repeating section/table with checkboxes-values pairs and then apply double eval trick same as in this article to get string of values where checkboxes are checked separated with a separator of your choice
August 13, 2009 at 11:05 am
Hi.
Great post and implemented. However I in browser I am getting the same issue as Dennis. You said
“Note: There is a problem with browserenabled forms. Rules at Contact Selector provide totally unpredictable results. So to make it work I’ve moved all Contact Selector rules to a simple button.”
How do I move these to a simple button please.
August 13, 2009 at 1:22 pm
Read hole discussion with DVN it covers in details what should be done.
August 13, 2009 at 2:33 pm
Hi
Thanks for the help I still get
msxml5.dll
Reference to undeclared namespace prefix: ‘my’.
Error occurred during a call to property or method ‘Eval’.
This is the rule
xdMath:Eval(xdMath:Eval(my:replyToControl/my:Person, ‘concat(my:AccountId, “|”)’), “..”)
August 13, 2009 at 3:01 pm
Try to delete “my:replyToControl/my:Person” part in the XPath formula and pick the Person group using field picker.
September 3, 2009 at 7:31 pm
Wow thanks for this solution! I have tried and tried and finally I found this. But when you give the NOTE at the end for browser-enabled forms, and you say : “So to make it work I’ve moved all Contact Selector rules to a simple button.”…..
what do you mean by moving all rules to a button? Can you show me how to do this?
Thanks!
September 3, 2009 at 8:18 pm
Edit: actually I desided to excude all parts of description that doesn’t work in browser. Check out XPath/layout changes.
The action with this rule:
xdMath:Eval(xdMath:Eval(my:Person, ‘concat(my:AccountId, “|”)’), “..”)
should be moved to any other control. The final XPath will be different depending on what control the formula and it’s condition (count(./my:Person)>0) will be moved (i.e. the relative XPath at a field to the my:Person group differs from XPath at a button because buttons are closer to the root)
September 9, 2009 at 9:36 pm
Hi Alec, great post! I’ve read through all the conversations and I am also getting the:
msxml5.dll
Reference to undeclared namespace prefix: ‘my’.
Error occurred during a call to property or method ‘Eval’.
error. I am using a button. I have the count-person condition and the eval rule on this button. Any ideas?
September 10, 2009 at 1:05 pm
Make sure you have latest version of XPath formula. I recently updated formulas to be compatible with Form Sevices.
September 10, 2009 at 2:38 pm
Yep I have the latest xpath formula:
xdMath:Eval(xdMath:Eval(my:Person, ‘concat(my:AccountId, “|”)’), “..”)
I have more than one contact selectors so I also tried:
xdMath:Eval(xdMath:Eval(../my:A12participants/my:A12participant1/my:Person, ‘concat(my:AccountId, “|”)’), “..”)
Still no luck. Here is part of my data source structure:
-A12participants
-A12Participant1
-Person
DisplayName
AccountID
AccountType
Any ideas?
September 10, 2009 at 3:07 pm
You have to remove leading ../
Also in AccountId “d” is lowcase. It’s important(both field and formula).
September 10, 2009 at 3:33 pm
The cap “D” was my mistake when replying to you. It is actually lowerces in the form. I tried taking the “../” out and I also tried “./”. I also tried choosing it from the field picker. No dice. Anything else I should do?
September 10, 2009 at 3:54 pm
Is any of your upper group levels for the Person group are repeating ones?
September 10, 2009 at 6:44 pm
No. A12participants and A12Participant1 are not repeating groups. Does it matter how I setup the other contact selectors?
September 10, 2009 at 7:06 pm
It’s hard to say what is wrong in your case. I could look into the code of the stripped version of your form if you OK to share it somewhere.
September 17, 2009 at 2:25 pm
Hi Alec,
I have used this formula to obtain a list of email from a repeating table:
eval(eval(GrpTechDept; ‘concat(my:TechEmail, “;”)’); “..”)
I got a resulting list like this:
“email1@blabla.com;email2@blabla.com;email1@blabla.com”
Now I would like to remove the duplicate email from this list. Is there a trick to improve the formula above to prevent concatenating duplicate value (codeless of course).
Thank you in advance. Kind regards,
Thanh-Nu
September 17, 2009 at 2:51 pm
Sorry I don’t know how to do that. In my enviroment i don’t care about duplicates. At least Exchange2007 is smart enouth to not send email twice.