Off the top of my head...you could explore using a loop where you compare the string to an ordinal position within the collection using a Decision. If there's a match increment a counter variable (different from the loop counter) if not don't, loop around until it has compared against all the values in the collection and you should have your count.
I'm sure there are wrinkles you'll have to iron out...but it might be a start.
------------------------------
George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
Technical Adoption Champion
Genesys
2024 Community Member of the Year
------------------------------
Original Message:
Sent: 08-20-2025 08:52
From: Werner Klomp
Subject: "Count if" string collection
Hi all,
I'm trying to do a "count if" within a string collection but having some trouble getting this to work.
Scenario:
- There's a string collection named "Common.Queue" contain multiple queue IDs.
- There're multiple strings named "Task.QueueToCheck1", "Task.QueueToCheck2" etc. etc. containing a single queue ID.
I need to check if the queue IDs within the string collection match with one of the strings and do a count on that.
Example: the String collection "Common.Queue" contains these ID's:
9bc26187-4b33-4bff-b2c3-9694a8cac1b3
9bc26187-4b33-4bff-b2c3-9694a8cac1b3
40bcbe5e-ea5a-452d-a556-482932200806
The only match within the strings "Task.QueueToCheck1" till "Task.QueueToCheck7" is this queue ID: 9bc26187-4b33-4bff-b2c3-9694a8cac1b3
I should get a count of 2 since that queue is twice within the queue collection. Is there a way how I can do this within the architect? (preferable within a common module)
It is possible to change the separated strings to a string collection as well if that makes it easier. (seemed to make it more complicated so I pulled them apart)
Thanks!
#Architect
------------------------------
Werner Klomp
.
------------------------------