Conditional Error Trapping
|
|
Is there an effective mechanism for conditional error trapping? For example, assume these are all Text Decision components.
Var1 Var2 (If Var1 > 0, Var2 must be > 10) Var3 (If Var2 > 20, Var3 must be <= 50, must be 25) Var4 (If Var3 > 5, Var4 must be != 15) Bill Braun |
|
|
Hi Bill,
There is no 'must be' command with conditionals. Can you describe what you are trying to prevent? Generally I try to put that style of logic in the model since the language there is much more powerful. I then make a reporting variable for the UI conditional Billy |
|
|
Hi Bill,
Yes, you can do conditional error trapping. As Billy explains, you need to set up the conditionals in the model. Also you need to set the decision properties that use conditional error trapping to ExecuteDecisionImmediately. You can do this for all decisions by adding: M ExecuteDecisionImmediately = TRUE Here is an example of conditional error trapping. Notice that the submit button is disabled and red text appears when both investments exceed $999. http://forio.com/simulate/mbean/decision-limit-trapping/run/ Here's the model for this example: M ExecuteDecisionImmediately = TRUE D Investment 1 = 0 D Investment 2 = 0 V Total Spending = Investment 1 + Investment 2 V Spending Too High = IF(Total Spending >= 1000, 1, 0) Notice that "Spending Too High" is triggered when Total Spending is greater than or equal to 1000. You can copy this model and interface into your own account here: http://forio.com/simulate/mbean/decision-limit-trapping/copy/ Best, Michael |
Please log in to reply to topics.