Strange issue: "Test Workflow" works but in Preview workflow doesn't work

Hi WeWeb!

I have following feature:

there list of products
there few lists of filters: brands, categories, tags etc and var array for each type
i set filters for products “if brand is in brandFilters array…” etc
i have checkboxes for each item of brands etc. If user check it → add to array brandFilters
is checked state IF “contains in brandFilters”

so I suppose this should work and it works when I use “Test workflow” - it works perfectly for every workflow I have set for this feature.

When I go to preview nothing works - condition, workflows…

Could this be a WeWeb bug? or I am doing anything wrong. Why then it work s in “test workflow” mode perfectly…

I recorded video: Loom | Free Screen & Video Recording Software

Another video showing that test workflow works but preview not Loom | Free Screen & Video Recording Software

From a quick look I think the problem can be the trigger of the workflow. Try using “on change” instead of “on init value change”.
My understanding is that “on init value change” will trigger only if the init value of the checkbox changes, for example if it is a dynamic value bound to a variable and you change that with another workflow.
When the user check/uncheck the checkbox the “on change” workflows are triggered.

I hope this can help.

1 Like

Thank you for the answer.
Ive tried on change - same behaviour - doesnt work

In the video you test the single action of changing the variable, in this way you are not testing the condition between the trigger of the workflow and the action.
The preview is executing the full workflow so maybe the action is not executing because the condition is stopping the workflow.
Try to test the full workflow to see if it is correct.


You are right, problem was that I have created 2 different workflows: IF (cheked) then run 1, another IF (not cheked) then run 2,.

I change action to 1 workflow with condition IF (checked) then (uncheck) else (check) and now it works!