checkbox validation and rules - InfoPath Dev
in

InfoPath Dev

checkbox validation and rules

Last post 02-22-2005 02:51 PM by Greg Collins. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-18-2005 12:24 PM

    checkbox validation and rules

    I have the following set of check-boxes

    || Promotion
    || Demotion
    || Salary Change

    If I check Promotion, Salary Change should also be selected. If Demotion was previously checked, it should become unchecked. Similarly, if Demotion is checked, Salary Change should be checked and Promotion must be unchecked if it was checked.

    This is supposed to be very straight-forward. Or atleast I thought. What I am doing is adding a rule in Promotion called "Update_D_SC", which contains the condition { Promotion == TRUE }, and the actions (set field Demotion = 0) and (set field Salary Change = 1). Likewise, I have another rule for the Demotion field called "Update_P_SC" which contains the condition { Demotion == TRUE }, and the actions (set field Promotion = 1) and (set field Salary Change = 1). This is not working!

    Strangely enough, the modified the second action in both rules to (set Salary Change = .) for Promotion and Demotion fields respectively, and that seems to work. Can someone *please* explain this to me, and let me know if there is a more sound way of achieving this?

    Thank you!

    --webuser

  • 02-22-2005 02:51 PM In reply to

    Re: checkbox validation and rules

    The logic you are using makes sense. I'm not sure why it is not working. One thought is that you are mixing TRUE/FALSE and 1/0. Just to recap:

    Promotion Rule:
    Condition: Promotion == 1
    Action 1: Demotion = 0
    Action 2: Salary Change = 1

    Demotion Rule:
    Condition: Demotion == 1
    Action 1: Promotion = 0
    Action 2: Salary Change = 1

    If for some reason this isn't working (and that wouldn't make sense) then you can always try using code in OnAfterChange event handlers.

    Greg Collins [InfoPath MVP]
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.