Mobile app framework7 on-click redirect from repeat list based on query params

Hi everybody,
This could appear so easy and basic but I couldn’t succeed in yesterday.

I have a repeat Card list from a query.
On click event on this card I need to redirect (or no) to 3 different pages of my mobile app depending of several query params value.

I tried with PageFlow without success.
How could I solve this?

Thanks

So what have you tried exactly, which failed?

(I deleted my code finally yesterday - just recreated it)

From my repeat link list

dmx-on:click=“app.main.f7page.flowRedirect.run()”>

This kind of AppFlow

Result:

Don’t know if App Flow is a good solution for this need, and not sure I setted it correctly

I see two issues.
First - your condition will always check the values of the first record in the repeat:

Second - if part of this url is supposed to be dynamic, then the expression is wrong. This is all static:

Also, when showing your code, please post your code here, not screenshots. We can’t copy code from screenshots.

And from what i see, in your case you either need to use params for the page flow and pass the clicked record location_pret and status_intervention, or just apply an inline flow for the repeat items onclick event.

Thanks for your answer - from what I understand;

  1. condition should be like next?

    condition: { if: "{{app.main.f7page.repeatUrgences[].statut_intervention==4}}", then: {

  2. I need to set the Redirect steps with dynamic ID

    run: { action: "{{browser_sub.goto('/assignation/'+app.main.f7page.repeatUrgences[].id_inter)}}", name: "RedirTraitementLoc" }
    This way?

Also, when showing your code, please post your code here , not screenshots. We can’t copy code from screenshots.

I will!

And from what i see, in your case you either need to use params for the page flow and pass the clicked record location_pret and status_intervention , or just apply an inline flow for the repeat items onclick event.

I tryed this, then asked myself how to set the value on click, maybe I just need to set the param so I can use it? I’m missing somthing

First setup all the dynamic parameters you will need for your flow i.e. all the ids and things that will need to get dynamic data from the clicked record under $param:

Then use these params where you need dynamic data in the flow conditions:

For dynamic go to action, you also use the dynamic expression:


And finally when you call the page flow using onclick you just pass the dynamic values from your repeat to the appropriate params:

1 Like

Thanks for the detailed answer! (settings param is the key)
I setted my params


(I remember I tried this process yesterday) I can’t get my params in the Action Editor / Run Step / Page Flow Parameters Panel…

@Teodor
I see the topic has been ASSIGNED (This is not my first recent topic to be assigned). Don’t want to waste your time - just to understand Wappler’s team process.

What does it mean? Do you think I don’t set my App Flow correctly? Or is it a bug?

We are going to check if there’s a problem with flow params not appearing in a mobile project and fix it if any.

ok, thanks!
in the meanwhile i tried to add my param in code view directly:

<a dmx-on:click="flowRedirect.run({id_inter: id_inter, statut_intervention: statut_intervention, location_pret: location_pret})" href="#">{{id_inter}} | st:{{statut_intervention}}</a>

Is it the good way to send 3 params?

Yes, the code looks correct.