In my conditional branch, I never fit in the validated condition, despite that the parameters are good, or at least seem good to me.

I am checking the contents of a database table variable paramtragetable as well as a source file name variable fichiersource. Everything seems coherent to me, as attached on the captures.

Do you see where the problem can come from?



OK, sorry if I'm not clear.

I have 4 initial variables: Base PostgreSQL, Paramétrage Schéma, Paramétrage table and Fichier Source. The first 3 are database type entries. Source file is vector layer type (I load a layer). I want to check the values ​​of these variables.

The Vérification du schéma condition checks that the schema of the selected database variable is the correct one for the script. Ditto for Vérification vidange which checks the table of the database variable. These 2 conditions work correctly. The Vérification source condition verifies that the loaded layer name does indeed contain a certain defined value (in my example epci.shp).

But the formula @fichiersource LIKE '%epci.shp' is never true, we always enter the condition @fichiersource **NOT LIKE** '%epci.shp', while the log tells me that the variable @fichiersource = ' C:/GIS/Data/Administrative/EPCI/epci.shp', therefore contains "epci.shp".

Is it clearer?

  • Be sure to select Dependencies (click ...) in the algorithm that should be based on the conditional branch and check the box next to the condition you want to apply. See here: gis.stackexchange.com/a/446293/88814
    – Babel
    Nov 30, 2022 at 8:48
  • The conditional branch does not depend on any algorithm! this is the first step, in order to know if the script can continue or not. But I don't think that prevents it from seeing the values of the variables, does it?
    – nicolas34
    Nov 30, 2022 at 9:08
  • I think you should make the conditional branch make dependent on an algorithm, this seems to be the logic of the tool.
    – Babel
    Nov 30, 2022 at 12:50

1 Answer 1


Ah yes, there is indeed an algorithm connected (vidange de la table) to the conditional branch by the dependencies, but the problem is not there. The problem is that the conditional branch Vérification source itself is never "ok" despite the upstream variable Fichier source looking correct.


Myybe I'm not going at all well to check the value of the source file (input vector layer parameter), and that I have to use another tool to know the name of the loaded layer?...

  • 1
    So this is part of the question, not an answer? In this case, edit the initial post an paste this there. To me, it's still not clear what exactly you want: can you describe a bit clearer what condition you want to apply where?
    – Babel
    Nov 30, 2022 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.