activate deactivate a join dynamically


I would like to active/deactivate a join in my agreggrate thanks a local variable or another solution.

Do you know how to do please ?

Best Regards,



Hi Julien,

If you are working on a Reactive / Mobile application, you can create a DataAction and based on your local variable do a query with join or without and assign it to the output variable, like the example below:

To refresh the query with or without a join, you just need to update the local variable (in my case UseQueryWithoutJoin) and refresh the DataAction:

If you're working on a Traditional Web application, you will have to have a local variable to hold the list of records and the principle is the same: use an If with your local variable to decide if you do the query with a join or without, and assign the result to the local variable list and you us that local variable in the screen.

Kind Regards,



What are you trying to achieve?

I understand the question, but not the problem ;)

It's quite possible for your use-case, that you can do it with 1 aggregate.

This means using a left join and an extra check if the result id is filled or not.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.