cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Steve0
Microsoft
Microsoft

Matching on "Channel Name" from List Channels

I am in need to match the channel name to a field I have further up in the flow. You can see in the image below AssignedDept = Facilities and in my List Channels output a channel name "Facilities". Why does the condition come to "false" when comparing "AssignedDept" with "Channel Name"

ChannelName.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Solved it with a Filter Array
FilterArray.JPG

 

View solution in original post

30 REPLIES 30
efialttes
Super User
Super User

Hi!

The term on the right of your condition rule... hover your mouse over it, I guess you assigned the value items('Apply_to_each')?['displayName'], right?

 

One more question... your sharepoint field on the left side of your condition rule... can you also hover your mouse over it? is it defined as a single line of text, a choice, a lookup?

 

Finally, sometimes we inadvertently add 'hidden' spaces when adding a name... In order to avoid such issues, my advice is to use 'contains' instead of 'equals'

 

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Here's the hover overs. Yes single line of text in Sharepoint. Thanks for looking at this for me.
ChannelName2.JPG

Channnel 3.JPG

Tried "contains" still no luck.
Channel4.JPG

Hi again!

There must be something really simple we are missing somehow...

My next suggestion is to add a couple of dummy 'Compose' action blocks inside your Apply to Each before Condition action block just for troubleshooting purposes, and assign them both terms you are about to evaluate on your Condition.

 

Once you reexecute the flow, you can inspect both 'Compose' action blocks output for each Apply to Each iteration.

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Here they are composed right before I use them.

Channel5.JPG

Got rid of the SharePoint and used the Output and still no change.

Channel7.JPG

Hi!
Sorry I did not explained myself well. Please assign to ComposeChannels the expression
items('Apply_to_each')?['displayName']
Thanx!


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Like this?

 

Channel8JPG.JPGChannel7,JPG.JPG

 

So when I route to "General" channel it works because thats what "List Channels" is returning. So does that mean the Apply to each "Channel List" is only finding "Channel Name" = General?

 

Channel9.jpg

hi @Steve0  just to test did you change the possition of your condition?

change.jpg

So the reason is becouse when you compare using contains for example I get the right output by comparing frist the array to the value.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Hi!
How many iterations did 'Apply to each' execute?
On the upper side of the 'Apply to each' execution, you can see the total number and also click on the arrows (left and right) to check the result on other iterations
Hope this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



25 iterations and General the one that works id the first one list.


25 iterations

Channel10.JPG

Yes I swapped and still failed
Capture11.JPG

@Steve0  try this please.

do1.PNGdo2.PNG



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

What goes in the intialize variable?

It works with "General" every because its first in the list. Create a Channel called Facilities and try.

@Steve0  just leave it empty, this action allows you to save all the values in your list and then you can compare it



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

It always comes out to "General" event though AssignedDept is "Facilities"

Channel13.JPG

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,145)