IF construct doesn't work

HI,

none of the cases 2, 3, 4 was fired. Is the syntax ok ?

Thanks,

Michel

Yes, your syntax and logic looks good. If Auftrag has a value of “1” then both Case 1 and Case 2 should fire.

Are you sure Auftrag was ever equal to exactly “1” (in order to fire Case 2)? Maybe it was equal to “0” when you thought it should be “1” such that Case 1 would fire but not Case 2, or maybe the value of Auftrag gets set to something like "1 " (number one and a space) which could look just like “1” but not evaluate to “1”. You could add a “debug” action to Case 1 to set the value of a global variable to the value of Auftrag to test it. Use the Console in the Axure Preview browser window to inspect global variables. You can also click the “Start Trace” button and reload the page to see which cases actually get fired.

It could be that Case 2 does get fired but the Set Selected List Option action doesn’t do what you think it should do. Double-check the list options in the target list to make sure it contains exactly what you are trying to set as selected. I’ve noticed in the past if I change the contents of a widget after creating logic that tests it, the action gets broken, but the interaction code still looks fine–until I open that action to edit it (although in general I think RP9 has improved this over RP8.) So, try double-clicking your Set Selected List Option actions to see if the intended targets are still valid.

If things still don’t work, you can upload your .rp file to allow forum users here to inspect and test it. Or, you can attach it to an email to support@axure.com and they can have a crack–they are usually very responsive and successful in debugging issues.

1 Like

HI mbc66,

it was my mistake, the actions were in the wrong sequence…. No it works with it.

Cheers,

Michel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.