4 Replies Latest reply: Oct 3, 2013 9:58 AM by Joni Vandenberghe RSS

    Dynamic action not seeing session value

    raoul

      Hi all,

       

      I have a little issue.

      My case: One person should not have more than 160 working hours, but this should not be a restriction but rather a warning.

       

      My solution:

      Create a dynamic action on mouse button press that gives a confirm and if you want to continue a page submit.

      Than this dynamic action has a condition that a variable is greater than 160 hours.

      The problem with this method is that it does not work on the first insert. The validation is not done as the item is null and does not have hours filled in.

       

      Solution2:

      Create a hidden item to_much_hours.

      Create a dynamic action on the working hours item lose focus that sets the to_much_hours hidden item with true.

      Create a dynamic action on mouse button press that gives a confirm and if you want to continue a page submit.

      Than this dynamic action has a condition that item to_much_hours = true.

      The problem with this method is that it only works after a page submit. What I mean is when I try to submit more than allotted hours I can still do so freely.

      But if I try to submit more hours and another field is filled in wrong and a validation error appears. On the next try the conformation popup appears.

       

      Can u help me?

      Raoul