First of all I would like to say that most credit goes to Scott Heim who wrote this great article earlier about using the Contact Selector.
With that said, now let’s get started on more tips and tricks on this userful control.
Now let’s see how our datasource looks like, after applying the steps in the Scott Heim’s guide.
Most people will want to use this control several times in their form. The problem is that InfoPath will not allow duplicate element names in the form’s datasource. Therefore, it is impossible to repeat the same datasource heirarchy which this control depends on.
Now to demonstrate how to overcome this problem, let’s check out the following steps:
- For the sake of the example, let’s say we have a repeating table, where I want each row to have it’s individual contact selector.
We will start by creating the datasource for this table, you should have something looking like this:
- Now that our table datasource is ready to receive it’s ContactSelector.
Rigth click on the original contact selector datasource “gpContactSelector” which we created earlier, and click Reference.
- Now choose the destination of the contact selector control reference.
- Almost done, now to test it, right click “grpRepeating”, and choose “Repeating Table”.
- You can see that the table was created but the last row has been rendered as a repeating section. Now right click the parent “Optional Section”, and choose “Change To”, then choose “Contact Selector”.
- And you’re done 🙂 , this should be your final result.
Please check back for more Tips & Tricks 🙂 See Ya!