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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / unceck a checkbox to r...
Power Apps
Unanswered

unceck a checkbox to remove items from mail "To" field

(0) ShareShare
ReportReport
Posted on by

Hi community,

i have an app in which i want to send a mail to some predefined DL, i created it in a sharepoint and when i want the mail to be sent to it i check a checkboc 'Distribute'

Perez_0-1622646096200.png

checking the 'Distribute' checkbox added the 2 users to the mail

 

how can i remove these users from the mail on uncheck?

thanks.

Eyal

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    How are you adding them?

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @Perez ,

    Do you send email using Office365Outlook connector?

    How do you get the predefined emails? Type them manually?

    If you send email using Office365Outlook connector, and using two static email, you can try this solution.

    1. Set OnCheck property of your checkbox to(save your two emails into a variable, remember to use ";" between these two address):

    Set(varUser,"user1@onmicrosoft.com;user2@onmicrosoft.com")

    v-albai-msft_0-1622710072527.png

    2. Set OnUncheck property of your checkbox to:

    Set(varUser,Blank())

    v-albai-msft_1-1622710165989.png

    3. For your send button, try this formula:

    Office365Outlook.SendEmailV2(varUser,"title1","body1")

    Best regards,

    Allen

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @Perez ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Best regards,

    Allen

  • EP-29071004-0 Profile Picture
    on at

    Hi @v-albai-msft , thanks for your response.

    im taking the emails from a multi select person column in sharepoint.

    when the user check the Distribute checkbox the emails are gathered using this formula:

    Collect(MyPeople, Ungroup(MailAudiance,"MailTo"));

    but the MyPeople collection can also get additional emails from other sources like the To box.

    so my issue is to remove only the items added by the Distribute checkbox and not clear the whole collection.

     

    thanks in advance.

    Eyal

     

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @Perez ,

    Do you mean when check Distribute checkbox, MyPeople collection will add two more people from the multi select person column? 

    What is MailAudiance mean in your formula? Is this your list name?

    Also, is MailTo your person column name?

    Simply I can say that you want to remove two person from your MyPeople collection when uncheck the checkbox, am I right?

    Best regards,

    Allen

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard