Button enable condition does not fire in certain scenario

Hi there!

I’m using the Wizard component (which is AMAZING) in my app. I am using Enable conditions on a button in a certain spot. Basically the idea is, the user cannot move on to the next step unless the conditions are met. Namely, my conditions are that

1. a field on one model is non-empty, and …
2. a different model has data rows.

Everything works great under normal circumstances. The issue I have is that, I also have a “Start over” button that uses the Action framework to empty all data from both models in question and then navigate back to step 1.

If I use that, when I come back to the step the second time around, this time the enable condition does not fire properly. That is, I can verify on the console that the conditions ought to be satisfied, but my button does not enable.

Is there something I’m missing? Perhaps a way to force a re-evaluation of the enable condition programmatically?

Any help is appreciated!

Thanks,
Hamza T.

Hamza, I may have run into something similar - I have a field that is set to only enable if another field’s value is blank, but the enable condition is simply not firing. Going to look deeper; will let you know if I find anything.

Thanks! Keep me posted!

I’ve experienced the same thing in a wizard, with an enable condition that checks a field’s value. It works the first time, but when I go back to the step again, the button is not enabled (although it should be by the console data).

Hi Hamza and Matt~

Thanks for letting us know about this! I was also able to replicate this problem and have let the team know.

Karen

Try to change your conditions from ’ = true’ to ‘!= false’. Sometimes, when I have troubles with rendering/enable conditions, that works fine.

I have encountered a very similar issue. I was able to work around it by adding a “Run a Skuid JavaScript Snippet” action instead of the “Navigate to Step” action.

The code I used for the snippet:
skuid.component.getById(‘YourWizardID’).render();

Initially, I used the button id, instead of the wizard id, with this code to fix the “Enable Conditions” not validating, but it did not work for the issues with “Render Conditions”. Re-rendering the whole wizard has fixed both issues for me (and automatically navigates to the first step).

Kaleb - if I use wrapper id instead of wizard ID in the snippet
skuid.component.getById(‘YourWizardID’).render();

Will that work?

Thanks,
Dinesh