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 / If there are multiple ...
Power Apps
Unanswered

If there are multiple addresses, they are separated by spaces, commas, or semicolons in gallery; if multiple addresses are detected, all valid addresses are added to the recipients.

(0) ShareShare
ReportReport
Posted on by 4

When a user adds recipients, the following checks are performed: Is the address a valid email? If there are multiple addresses, they are separated by spaces, commas, or semicolons in gallery; if multiple addresses are detected, all valid addresses are added to the recipients.

 

I used this code for it but the gallery name field gives an error (ThisItem.Osoite) (Osoite = expected text value)

 

ForAll( Split( Substitute(Substitute(Trim(VastaanottajaOsoite.Value), ";", ","), " ", ","), "," ), If( IsMatch(Value, ".+@.+\..+"), Collect(vastaanottajat, {Osoite: Split( Substitute(Substitute(Trim(VastaanottajaOsoite.Value), ";", ","), " ", ","), "," )}) ) )

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,632 Most Valuable Professional on at

    Hi @1213 ,

    Are you trying to do this ?

    ForAll( 
     Split( 
     Substitute(
     Substitute(
     Trim(VastaanottajaOsoite.Value), 
     ";", 
     ","
     ), 
     " ", 
     ","
     ), 
     "," 
     ) As _Data, 
     If( 
     IsMatch(
     _Data.Value, 
     ".+@.+\..+"
     ), 
     Collect(
     vastaanottajat, 
     {Osoite: _Data.Value}
     )
     ) 
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • goncalomelo8 Profile Picture
    on at

    Hi @1213,

     

    This is happening because you are sending a table (the output from the Split function) to the Osoite field, which is expecting a text value. To fix it, you can do as follows:

     

    With(
     {
     SplittedEmailAddresses: Split(Substitute(Substitute(Trim(VastaanottajaOsoite.Value), ";", ","), " ", ","), ",")
     },
    
     ForAll(
     SplittedEmailAddresses, 
     If(
     IsMatch(Value, ".+@.+\..+"), 
     Collect(vastaanottajat, {Osoite: ThisRecord.Value}) 
     ) 
     )
    )

     

    Have a great day!

     

    Kind regards,

    Gonçalo Melo

  • 1213 Profile Picture
    4 on at

    Thanks! I got it with that one!

  • goncalomelo8 Profile Picture
    on at

    Glad to know that @1213. I would kindly ask you to mark the answer as the solution.

     

    Cheers

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 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard