Highlight Fields That Change Based on DropDown Value - InfoPath Dev
in

InfoPath Dev

Highlight Fields That Change Based on DropDown Value

Last post 07-29-2009 11:48 AM by e_stylzz. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-22-2009 07:15 AM

    Highlight Fields That Change Based on DropDown Value

    I have a form that has a dropdown list with a few values.  If the value "Amendment" is selected, I'd like to highlight any fields that change thereafter.  Is this possible in anyway?

  • 07-22-2009 06:18 PM In reply to

    Re: Highlight Fields That Change Based on DropDown Value

    Not the easiest solution, but what you can do is add an attribute called changed to all the fields whose changes you want to track.  Then create a rule on each of these fields like this:

    Condition: Mode = "Amendment"
    Action: Set changed to "true"

    This rule should fire any time one of the fields is changed while the dropdown value is "Amendment"

    Then add conditional formatting to each of the controls to highlight them when their changed attribute is set to true.

    Might that work for you?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-23-2009 07:25 AM In reply to

    Re: Highlight Fields That Change Based on DropDown Value

     That sounds like it will meet my needs but it's a little unclear on how exactly to do this as I am fairly novice. Can you go into a little more detail on the process of setting up an attribute and triggering that a change has in fact taken place?  I'm good on the conditional formatting.  Thanks a lot for your reply!

  • 07-23-2009 10:17 AM In reply to

    Re: Highlight Fields That Change Based on DropDown Value

     To create an attribute field, just right-click any field in your data source (in the taskpane) and click "Add..."  A dialog will come up that allows you to name the attribute and create it.

     To create attributes with the same name in more than one place, right-click the attribute you want to reuse, select "Reference..." and then select a destination for it.  This can be tedious, but you'll get it done eventually :-)

     To create a rule on a field, again right-click the field and open its properties, click the Rules and Merge tab, and click "Add..." Rules' sole purpose is to trigger when a field's value changes, so once you create the rules with the requisite conditions, you should be all set.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-27-2009 08:05 AM In reply to

    Re: Highlight Fields That Change Based on DropDown Value

    So I create an attribute for a field by right clicking it, select new, and name it.  Now I have an attribute.  I look at the "Validation and Event Handlers", and see nothing about is changed, and I look at rules, and see no conditions for is changed.  I'm so close, but so far away. 
  • 07-27-2009 08:36 AM In reply to

    Re: Highlight Fields That Change Based on DropDown Value

     As I've already said twice, rules fire when their related field has its value changed.  That's their purpose and that's what they do.  There is no special option for an "is changed" rule because all rules on form fields are "is changed" rules.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-28-2009 11:21 AM In reply to

    Re: Highlight Fields That Change Based on DropDown Value

     Ok, I'm a little slow to catch on, but I'm getting there.

    1. I setup my attribute, and called it originalfieldnameChanged. Set the type to True/False is that correct?
    2. Setup a rule on this attribute (originalfieldnameChanged) with a condition of ddlField = "Amendment" and an action of "set a  fields value" (originalfieldnameChanged) to = True.
    3. Setup conditional formatting on originalfieldname to shade if originalfieldnameChange = true.
    I'm sure I'm missing a little something, because it's just not working.  I appreciate your patience thus far! Thanks,

     

  • 07-29-2009 01:16 AM In reply to

    Re: Highlight Fields That Change Based on DropDown Value

     Looks like you're almost there.  In step 2, you need to set the rule on the field itself, not the attribute, and the rule should be setting the value of the attribute (which you appear to already be doing).

    If you fix that, you should be all set.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-29-2009 11:48 AM In reply to

    Re: Highlight Fields That Change Based on DropDown Value

     Worked like a charm!  Thanks a lot!

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