if we can mix conditions and actions in app connect that will make wappler on the same level as the top end visual web app creators today, for example something like this:
on the Dynamic Event for serverconnect form
if var==true
got to location
else
display notification
I believe it could already work with App Connect, like {{ var == true ? browser.goto(url) : notifies.danger('My Error') }}. This is currently not possible with the UI in Wappler and you also can’t use the actions as parameters in formatters like {{ (var == true).then(browser.goto(url)) }}.
I will try that thanks @patrick
at least if we have some documentation for App connect on this matter it will be wonderful
i don’t mind not using the UI for complex stuff.
I dont know if we are talking about the same thing but I think yes.
-I have a ServerConnect action that returns a value based on some conditions.
-In the AppConnect on the success event (it is a form that executes the ServerConnect action) I want to do different stuff based on the value that I get (for example open a modal or goto another url).
sure you can. use what patrick suggested. it worked with me.
instead of var use your value returned from the server connect and then do the conditional part.
I am very close to this but having an issue check below {{get_items_in_cart.data.totalCost[0].temp_cart_quantity==0 ? browser_empty_cart.goto('index.php') : console.log('')}}
The issue is that if ‘get_items_in_cart.data.totalCost[0].temp_cart_quantity’ has no value it just disappears, I mean I can not compare it, it does not exist. How can I check this? If for example I use this
when quanity ==1, it works. How can I check when it is =0, since there is no quantity the get_items_in_cart.data.totalCost[0].temp_cart_quantity becomes empty, not 0.
I also tried get_items_in_cart.data.totalCost[0].temp_cart_quantity==false or get_items_in_cart.data.totalCost[0].temp_cart_quantity!= true , with no luck.
Or what exactly the condition you are trying to achieve is?
Do you at any moment set the value of the get_items_in_cart.data.totalCost[0].temp_cart_quantity to 0? Or do you want to check if any values are returned at all?
Please explain the conditions you need to check.