Using Infopath Datafields which have same name in different groups - InfoPath Dev
in

InfoPath Dev

Using Infopath Datafields which have same name in different groups

Last post 10-31-2011 10:35 PM by bvallambhotla. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-31-2011 04:13 AM

    Using Infopath Datafields which have same name in different groups

     Hi,

    Iam getting an error while adding a new datafield to a group. It says that the "A field or group with that name already exists". and it says to add a reference

    Here is my situation :

    I have two groups : 

    1. Consignee

        a. companyname

        b. contactname

        c. accountid

    2. Shipper

        a. companyname

        b. contactname

        c. accountid

    Now Im designing the data source as per the requirement, I have added data fields to Consignee group, but Im not able to add the fields to Shipper group, Its asking me to add reference. If reference is added the properties updated in one datafield are automatically reflecting in another datafield. But i want different properties for data fields with same, which are in different sections. 

     Please help me out !

     

  • 10-31-2011 04:30 AM In reply to

    Re: Using Infopath Datafields which have same name in different groups

    Which properties are you looking to have different between the fields in one group and the other?  Is there a reason you need to have the fields named exactly the same?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-31-2011 05:09 AM In reply to

    Re: Using Infopath Datafields which have same name in different groups

     not specific, but it can be anything like mandatory fields. The same named field can be mandatory in one group, but it might not be necessary in another group. But my requirement is to have same fields names in 2 different groups for which I can change properties independently. Im very new to infopath, please tell me if there is any work around for this one.

  • 10-31-2011 06:40 AM In reply to

    Re: Using Infopath Datafields which have same name in different groups

    In general, all fields with the same name have to have the same setting for Type, Data type, Repeating, and Cannot be blank, and if any of them have children or attributes, those have to be the same too.  I think there are ways to break this restriction, but I definitely would not recommend them.

    However, there are ways to work around some of these restrictions.  Each different instance of a field in the data source can have its own default value, rules, and validation rules.  So if you wanted one of your companyname fields to be required, but not another one, you could add a validation rule to one of them to require it to not be blank.  If you wanted to enforce that one of your accountid fields is numeric but not all of them, or something like that, you could make the field a string data type, and add a validation rule to ensure that certain ones match the pattern for a number.

     Does that sufficiently answer your question?  Is there anything else you would be looking to do besides these examples?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-31-2011 10:35 PM In reply to

    Re: Using Infopath Datafields which have same name in different groups

     Thanks a lot Jimmy, that gave me some idea to work with ! I will try to explore more !


     

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.