Home > Forum > Processes > [solved] Parameters in filter query don't work

[solved] Parameters in filter query don't work
0

Hello,
I'm trying to import user data from the import WF (1) into the employee WF (2) and route based on whether the user has an Active Directory account.
Depending on whether the user has an Active Directory user or not, the user should either be sent to the blue path or to the purple path in WF (2).

The issue is that the business rule in the 'Start a Sub Workflow (SQL)' actions, which checks if someone has an AD user or not, isn't working when I pass parameters like ##Vorname## [engl. Firstname] and ##Zuname## [engl. Surname] (which turns into {Vorname} & {Zuname}).
The filter works with hardcoded names but fails with passed parameters.

Any ideas on what I'm doing wrong or how to fix it? Is there a better approach?

In reply to: Jacek Wojnar

Hi,
I think (like Daniel), that it would be easier to do it with a SQL condition in the first query.
You can add the condition

AND EXISTS (
SELECT 1 FROM CacheOrganizationStructure
WHERE COS_AD_givenname like '%%' AND COS_AD_sn like '%%'
)

I had few days ago similar problem to check if user is Active or not in AD ..
in my case I have item list with "people"
I do first check to see if they can do or not do something [you don't need this condition]
then 2 check is user active by SQL >> 1 or 0 result
1 is "active"
0 is "not active"
so here you can put sub flow or what ever on yes or no path condition or use case select [2023 /2024 webcon] (i'm on 2022 ... so I need yes/no ... )