Action Not Working? - InfoPath Dev
in

InfoPath Dev

Action Not Working?

Last post 12-02-2010 07:56 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-30-2010 02:15 PM

    Action Not Working?

    Why doesn't this action run?

     Condition: if fieldxx is not blank and fieldyy is not blank

    then do action: set fieldzz to value fieldaa

     Where field zz is the field in which i'm writing the rule for, and its a read only text box, where as field xx and yy are also read only text boxes that obtain data when certain boxes are checked.

     In short, I want it to be display something in a text box if other text boxes are filled, but that rule doesn't seem to work?

  • 11-30-2010 02:53 PM In reply to

    Rules fire when the field they are set on changes. Since fieldzz is the field with the rule, and it has a read only control bound to it -- what changes fieldzz to fire the rule?

    As a side note, you can use an expression box (calculated value in IP 2010) for this as well -- have the text you want to show in the expression box (in this case, a formula to show fieldaa) and use conditional formatting to show or hide it:

    If fieldxx is blank and field yy is blank, hide this control

    Hilary Stoupa

  • 11-30-2010 04:31 PM In reply to

    Unfourtunately I can't have a hardcoded value in the current control, as the field is dynamic it can't be hidden and appear with a set text in it. Its text must derive from another text box, but never set only to that text box (so its default value cannot be of that text box and only ever set to it when this condition is met).

  • 11-30-2010 04:36 PM In reply to

    Okay -- but the concept is still the same -- the rule to set the value must be on a field that changes. So if fieldzz never changes (as it is read only -- you'd have to be changing it with another rule, since the user can't change it) the rule never fires.
    Hilary Stoupa

  • 11-30-2010 04:43 PM In reply to

    Hmm, thats the way I've been doing it currently, but whats the most efficent way of doing this?

     this is currently what i'm doing:

     Fieldzz is a input field

     Fieldxx is a read only field

     Fieldyy is a data store field

     First Rule on Fieldzz -> if fieldzz is not blank set fieldxx to fieldyy

     Second Rule on Fieldzz -> if fieldzz is blank set fieldxx to "" (blank)

     Or must I do that throughout every box?

  • 11-30-2010 04:53 PM In reply to

    In you initial post, I thought you said fieldzz was "read only"? Did I misunderstand?

    At any rate, as soon as the field CHANGES, your rules will run. But if the field starts as blank and remains blank, no rules will run.

    Hilary Stoupa

  • 11-30-2010 05:03 PM In reply to

    Sorry was just using hypothetical names.

     The rule works, but is there any "easier" method then creating that rule individually for 50+ fields?

  • 12-02-2010 07:56 AM In reply to

    I am afraid this will sound snarky -- but perhaps you should rethink your design? I'm just perplexed as to why a form would have a field that gets set to a specific value based on 50 different fields -- I could see a single field that gets the new value from a data source based on what is input, that I get....

    At any rate, if 50 different fields can set your target field to different values, I think you have to put a rule on each of the 50 fields that can change.

    Hilary Stoupa

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