Populating other fields based on dropdown - InfoPath Dev
in

InfoPath Dev

Populating other fields based on dropdown

Last post 08-02-2006 08:34 AM by clcope. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-01-2006 02:16 PM

    Populating other fields based on dropdown

    I have a drop down that populates 2 other fields. Im trying to create a rule that will then combine all 3 fields into one using concatenate. So I have a rule on each of the fields that were populateed by the dropdown. However, the only rule that is working is the one I added on the dd. The rules that are on the other two fields never get executed. I think this is because they never get changed by the user. I tested this by manually changing one of these fields and the rule fired.

    Here's my data structure:
    dropdown - Vendor
    field 1 - Vendor Contact Name
    field 2 - Vendor Phone

    vVendorInfo - field used to hold concatenation of 3 previous fields separated by a hyphen

    The rule on the dropdown is:Modify field value of vVendorInfo - set to Vendor if Vendor is not blank

    The rule on field 1 is:Modify field value of vVendorInfo - concatenate vVendorInfo and Vendor Contact Name if Vendor Contact Name is not blank

    The rule on field 2 is:Modify field value of vVendorInfo - concatenate vVendorInfo and Vendor Phone if Vendor Phone is not blank

    What I want is:
    Vendor - Vendor Contact Name - Vendor Phone

    What I DON#%92T want is:
    Vendor - - Vendor Phone (if Vendor Contact Name is blank – in a perfect world there would always be a name…but we all know the world isn#%92t perfect)

    The reason I created separate rules is that I only wanted to concatenate if the other fields were blank. I could create multiple rules on the dropdown. First, I would have to clear the vVendorInfo field. Then, I rules to create the concatenated value if only one field is populated – so that would really be 3 rules because you would never know which one is populated. Then, rules for when two of the values were populated. And, finally another rule for when all 3 fields are populated.

    Is this the best way to do this?
  • 08-02-2006 01:56 AM In reply to

    Re: Populating other fields based on dropdown

    If your data is coming from SQL Server, you can modify the SQL select statement to do the concatenation with an aliased field and then put this result onto the form.
    Dean
    Charlotte, NC
  • 08-02-2006 08:34 AM In reply to

    Re: Populating other fields based on dropdown

    Thanks, Dean. Unfortunately, data is coming from a Sharepoint list.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.