web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using Expression for B...
Power Automate
Unanswered

Using Expression for BBC field in outlook email to send email to multiple people on basis of Task Category

(0) ShareShare
ReportReport
Posted on by

Hello,

I am using power automate connected with power apps so that whenever an action has been taken on certain category ticket, an outlook email is sent to requester keeping admin team in BCC.

i am using below expression for BCC field- 

 

if(equals(items('Apply_to_each')?['Category']?['Value'], or('Position Creation','Hiring','Termination','Restructure','Personal Information','Employment Information','Global Assignment'),concat('justin@abc.com','pia@abc.com','allison@abc.com,maria@abc.com,ruel@abc.com,earl@abc.com,Ajay.l@abc,siddharth@abc.com, ';'),'Aj@abc.com')

 

#Power Automate # Expressions

 

When i use this expression then it say 'Invalid'. There is something wrong but, i am unable to figure it out.

Could please help how i can mention multiple categories and how effectively can maintain multiple email addresses in expression.

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: Using Expression for BBC field in outlook email to send email to multiple people on basis of Task Category

    I think the problem is the way you are setting up the equals().  You can't use the or() function to add multiple values to be considered.  You need to do something more like this where each potential value has its own equals()

    if(or(

    equals(items('Apply_to_each')?['Category']?['Value'], 'Position Creation'),

    equals(items('Apply_to_each')?['Category']?['Value'], 'Hiring'),

    equals(items('Apply_to_each')?['Category']?['Value'], 'Termination),

    equals(items('Apply_to_each')?['Category']?['Value'], 'Restructure'),

    equals(items('Apply_to_each')?['Category']?['Value'], 'Personal Information'),

    equals(items('Apply_to_each')?['Category']?['Value'], 'Employment Information'),

    equals(items('Apply_to_each')?['Category']?['Value'], 'Global Assignment'))

    ,concat('justin@abc.com','pia@abc.com','allison@abc.com,maria@abc.com,ruel@abc.com,earl@abc.com,Ajay.l@abc,siddharth@abc.com, ';'),'Aj@abc.com')

  • AJ_vizMan Profile Picture
    on at
    Re: Using Expression for BBC field in outlook email to send email to multiple people on basis of Task Category

    Hi @Pstork1 - Thank you for response. I am still struggling with above above expression.

    Earlier i posted that need to use 'Category' column in expression but, i need to use 'Sub Category' column in the expression instead.

     

    I tried 2 things -

    1. Used the equals expression as suggested and concatenated the email addresses. But, it's throwing an error

     

    AJ_vizMan_0-1623070587836.png

    It says 'Selection is not supported on values of type 'string'.

     

    2. Tried to initialize a variable of string type to hold email addresses but, it again results in error indicating

     'Selection is not supported on values of type 'string'.

    I think 'Sub Category' column type seems to be creating an issue. Any advice how we can deal with it.

    Thank you for your great support.

     

     

    Is it due to column type difference? 

    Have used 2 columns here 1. Sub Category - It is 'Single line of text' type column

    2. 

  • Verified answer
    Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: Using Expression for BBC field in outlook email to send email to multiple people on basis of Task Category

    The use of ?['Value'] would be for a dropdown column.  for a single line of text it should just be 'Apply_to_each')?['SubCategory']

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard