Getting started with App Connect Flow

I seem to have hit a similar issue as @TomD

I have a simple modal opening from a Click event -:

This works fine.

If I convert this to a flow it no longer works -:

I tried with and without the back ticks and also tried generating the flow instead of the initial action and then converting it…

There are no errors in the debug console.

If you remove the single quotes rather than the back ticks it should work - but you’ll then get an error message if you try to edit it in the Flow Editor. I expect this will be resolved on Thursday.

also tried generating the flow instead of the initial action and then converting it…

If you create a flow and then run that using a dynamic event - eg attached to a button - that should work fine. There’s no need to convert it.

Unfortunately not for me.

Agreed, but ultimately I want to use a flow so I can make this conditional. If I simply create the dynamic event, then click the flow button, it asks if I want to convert it automatically.

You can do this now. I wouldn’t have thought the problem converting dynamic events is relevant. You first add a flow component, with whatever conditions you need, and then attach it to a button. The button can optionally pass parameters to the flow, which might be used in relation to the conditions. I’ve only tried passing single parameters but it seems you can also pass multiple parameters - I imagine as arrays or perhaps JSON; hopefully some documentation will cover this at some point. No conversion is involved at any stage.

My understanding of the new flow feature is pretty minimal - I don’t think it’s quite what I imagined it was going to be - but I think the above is correct.

Yes, that’s what I’m trying to do, but it requires flows to work, right? That’s why I want to use a flow - as far as I understand I can’t have a conditional action? Or is that wrong (sorry - I’m quite new to using Wappler - just 1 week).

No - I agree. I was simply using that as an example of the fact that flows aren’t working. I’ve taken a standard, working, dynamic event, and pressed the Flow button so Wappler converts it to a flow with just this same single event, and it no longer works.

I totally agree that I could have done this without starting from a dynamic event - and I also tried that, but I figured that starting with an event that worked, and then having Wappler convert it should also work and it should have removed any possibility that I screwed something up?

Thanks. I’m totally in agreement with you - but it just doesn’t work for me at all. I also removed all my server side components and reloaded them thinking that maybe Wappler hadn’t updated to the latest 2.6.0 files, but that also didn’t help.

Unfortunately until I get this resolved I’m a bit stuck :frowning: .

I haven’t come across any problem using the Flow component itself, based on the little use I’ve made of it. Here’s a basic example of using conditions:

I have a dynamic table with a button in each row. Clicking the button runs a flow, sending the record ID as a parameter. Depending on the value of the ID one of two modals will appear:

Initially I wanted to check the branching by displaying the value of $param.id. However, it seems the scope of these variables is local to the flow (which makes sense). You could assign these variables to other variables if you need to display them etc.

It’s not a very useful example, but hopefully it will clarify matters.

Ok, thanks. I’ve fundamentally done something similar, when that didn’t work, I reduced it to the simple one line action I presented above, but that also doesn’t work.

Short of updating Wappler itself, is there anything else required to ensure the runtime files are also updated to the latest version? I assume Wappler updates local files (eg all the Server Connect PHP files) when updating the application?

I expect you have the right versions of App Connect - 1.9.0. I’m not using much else on this page - jquery-3.3.1 and the Table Generator and Modal extensions (and the current version of Bootstrap).

I think Wappler updates local files when relevant components are used. There is the odd issue with this however. You could delete this folder:
C:\Users\YOUR_USERNAME\AppData\Local\Wappler\Configuration
and restart Wappler or reinstall from scratch. I’ve never needed to do either of these.

Perhaps viewing the console output might help. Clicking a button described above, I see:

image

Thanks - that’s useful. I need to check later, but I don’t recall seeing anything in the console (although I may have only been looking at the error tab, so I will check later).

I remembered I have access to this now. This is all that is printed in the console when I click the button -:

I guess the obvious thing here is that you have your code wrapped in {{}} which I missed earlier, but this is likely the root cause.

Yes, but I didn’t enter them manually. It was all done via the UI.

Strange - I did everything through the UI and didn’t get the brackets. This is also why I tried to convert the working action to a flow as I figured it would remove any potential for me to get the wrong format.

That’s strange. Perhaps it’s a bug which will be resolved shortly. It might be worth reporting it as a bug.

I didn’t answer this, thinking it wouldn’t be necessary as it’s easier to use a flow. However, you can have conditional actions, eg:
dmx-on:click="var1.value==1?modal1.show():modal2.show()"
… but you can’t do this via the UI.

1 Like

as indicated earlier inline flows will be improved in the next update. It is also preferred to use separate page flows for complicated flows and not inline flows @cdjackson

So I confirmed that for me at least, editing a flow (adding an action into a flow) doesn’t add the {{}}. Removing the ’ that is added, and adding the {{}} works for the simple example of showing the modal, but

gives the following error -:

The action that was added before the modeal.show() is -:

{{parameter_query.set('parameter_id',tableRepeat1[0].id)}}

In the code, this is -:

<tr dmx-on:click="run([{run:{action:&quot;{{parameter_query.set('parameter_id',tableRepeat1[0].id)}}&quot;}},{run:{action:'{{parameter_edit.show()}}'}}])">

Thanks - when is this expected?

Ok, thanks. Although I’m not sure what I need to do is too complicated - it just requires two commands to be run, but I’ll keep this in mind in future. In general, it’s a nice feature (once it’s working :wink: ).

This is because of a inline flow expressions bug that will be fixed tomorrow:

1 Like

Guys please check:

This thread might be helpful w.r.t your question about what to do after a wappler update - Wappler update and js/php library files refresh in individual projects

Hi @TomD, I’m playing around with flows, and curious to know how you go this console output? I’m on mac & chrome is my browser, I can’t see anything like yours.

To get debug info in the dev tools console, you need to enter first:

dmx.debug = true

1 Like