I've mentioned this before but it won't hurt to get a reminder.
You can build your own custom JavaScript functions to be used by ProcessFlow in the Assign node. I have a client who wanted their requisitions approved based upon Company & Acct Unit instead of requesting locations.
They also wanted that requisition reviewed by all Approvers associated to the various company/acct unit combinations on the requisition. This meant that in both level 1 and level 2 of their approval process, all level 1 approvers (and then level 2 approvers) had to approve that requisition.
So each approver has to review the requisition and approve it and then it would move on to the next possible approver at the same level. Once all have approved at level 1 it then repeats this for level 2.
To do this I read through the requisition with a query loop and assign the company/acct unit values to a variable. I then use the Assign node to pass that variable to a custom function which excluded the duplicates and passes that back to another variable.
I then pass that new variable to an Assign node to read the current category filter value for each approver. I also track who has approved thus far and use another custom function to check that the current approver hasn't already approved the requisition under a different company/acct unit combination they may have been set up for.
The custom function needs to be added to the pflow.js file in order to be available to your flow file.