locked
using contact selector in repeating table

    Question

  • hi all,

    I have created a DataConnection to recieve data from DATABASE Via Webservice which will fetch the below fields in the form of Repeating Table:

    APPLICATION NAME (Text Box)

    APPLICATION OWNER (Text Box)

    CONFIRMOWNER (Check Box)

    NEWOWNER (Contact Selector)

    Now User needs to update the NEWOWNER Field. If user enters a value in Contact Selector of one row the same value is reflected across all the rows of repeating table. I don't want to happen this. Ideally user should be able to enter different values in each row i.e. Contact Selctor control should provide flexibilty to enter different values in each row of repeating table.... Could you please suggest me any solution for this issue. Thanks in advance...
    • Edited by Mike Walsh FIN Tuesday, July 20, 2010 6:41 AM NEVER say you want something asap. These are forums. Wait your turn. If you are in a hurry ring MS Customer Support Services and pay for support. Here, post and wait and don't push.
    Tuesday, July 20, 2010 6:12 AM

Answers

  • Hi Mahesh,

    You need to include the contact selector group in the repeating group containing the Aplication Name, Owner, Confirm Owner.  As it stands now, you are simply repeating the single contact selector, which is why the Contact Selector value is getting duplicated for each row.

    Your Main Data Source Should look something like this:

    myFields
         RepeatingGroup(repeating group)
              ApplicationName
              ApplicationOwner
              ConfirmOwner
              NewOwner(non-repeating group)
                   Person (repeating group)
                        DisplayName
                        AccountId
                        AccountType

    This will allow you to have individual contact selectors for each row of the repeating table.

    Now, the problem lies with the fact that you are pulling data from a database, which means you have a secondary data connection, containing the repeating group in which you are probably displaying on your form.  I assume you simply added the contact selector control to this repeating table, and are now experiencing the problem.  Please let me know if I have misunderstood anything.

    The only solution to this scenario is to utilize managed code to copy the contents of the secondary data connection into a repeating group in the main data source.  This will allow you to include the repeating contact selector control to allow it to store unique data for each row.

    If you have a web service data connection to submit back to the database, you would need managed code in your template to also move the data back to the secondary data source prior to submitting.

    Regards,
    Ian Kavanagh
    Microsoft Online Community Support

    Wednesday, July 21, 2010 7:09 PM