[PO] Workflow validation by Chef2 if Chef1 is empty

SUGGESTED

Hello,

We are on X3V12, purchase order workflows are working fine for us. We have a validation of "Chef" 1, 2, 3 and 4 depending on the amounts via a affectation rules :

But, for example: if the user's "Chef2" is empty, the workflow fails.

I would like to set the following condition: If "chef2" is empty, then validation.

Thanks

  • 0
    SUGGESTED

    Hello,

    I think the following should work:


    I am assuming Chef 1 / user 1 is always defined, so my idea is to automatically trigger another "VAL" workflow on approval whenever the following workflow user is empty, as you literally described (if user 1 may be empty, same logic/action can be applied in the main "POHSIG" workflow rule).

    At the end of an approval/"VAL", we check if the current level is inferior to the total number of users so it does not trigger at the last level (LEVSIG < S_NBRUSR) and if the following workflow user is empty (USER(LEVSIG+1)=""). If both conditions are true, then we want to trigger a "VAL" automatically, hence we call action "SIGWRK" for the current workflow record (identified by [L]CHRONO). This should work recursively, so in case you have only user 1 and user 4 defined, when user 1 approves, it should automatically trigger "VAL" for the workflow level 2 and 3.

    This is similar to how the standard calls this same action when the first workflow user is the current user or buyer, as you can see in the POHSIG workflow.