If there is no user returned by SQL command or rule that you used then you will get the error on the path starting subflow. It depends also on what type of step you use (system steps does not need to assign tasks). Source of your user list does not matter. You can use BPS users, AD or Azure for example. You can also use groups of users in the same way. If you want to direct task to certain groups of users, like BPS users, you need to filter them as Jacek mentioned by BPSid or other, or assign them to specific groups.
Thank you guys but I think I will start from beginning - I have a bad day today and I'm having trouble connecting the "dots".
From begining:
1. Item list (mix names form other flow not connected with any source so ID befor # is random) >> _Wszyscy Audytorzy
2. This Item list (_wszyscy audytorzy) is used in another Item list "Harmonogram Audytu / Kontroli" in field "Odpowiedzialny".
after filing full item list I would like to move to next step the "parent element" and start for each row new work flow.
3. Each sub work flow I would like to assigne to all people in cell row/column >> but:
if non of people: 123123#janek;123123223#bonifacy;12312#john is not a BPS user then assign to person from field "_Audytor Wiodący" (tech field) or whatever
if 1 or 2 or all people are BPS users then assign subwork flow to them,
at the moment I can start subworkflow (no sql - sorry I don't understand how to config the source tab to have proper data so ... I skipped that to "normal" "start subflow"
I understand I can do subflow with out for each but .. I can't config it in proper way....
So I did that:
I do for each row
inside i do just for check condition with sql >> but it returns all time false :| - probably by this random stuff before name ..any way is not working :|
i try to do this (chatGPT):
[code]
IF EXISTS (
SELECT
COS_BpsID,
COS_Login,
COS_IsActive,
COS_AD_name,
COS_AD_mail,
COS_AD_userprincipalname
FROM
CacheOrganizationStructure
WHERE
COS_AD_name IN (
SELECT
-- Wyodrębnij część tekstową po znaku '#'
SUBSTRING(item, CHARINDEX('#', item) + 1, LEN(item))
FROM
dbo.SplitToTable('{SN:936}', ';')
)
)
BEGIN
SELECT 1;
END
ELSE
BEGIN
SELECT 0;
END
[/code]
still c**p ... :|
I was even thing maybe other solution like >> in each row add more tech column and by form rule check if names used in "odpowiedzialny" is in bps users ... if yes then put in some techfield1 and in tech2 field put "true"
and if non then empty tech1 and "false" in tech2 and then do in automation to grab false value and easy sub flow and if true then grab field to who assign ... in theory sound easy ... but constract buisnes rule / rule in cell Odpowiedialny ... not realy easy ... :|
in [system] start path I fill other Itemlists in subflow ...
I guess ..if I could manage assigments then should be easy to do similar way to create Tech item list in sub flow with 2.2.2 i row 1 and 2.2.3 in row 2 and do automation for each row to fill Item list with questions .. but this is not the main issue ....
Probably is easy way to solve my problem but i don't see it ..