cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MickNaul
New Member

Sending mail depending of text box and contains

Hello, 

 

I'm Trying to do something in power apps, it's close to the subject already treated " Send Email Based on Text Input with contains", but little bit diiferent. ANd unfortunately I didn't find any advice or solution to solve my issue.

 

I would linke send a mail depending on text Input :

 

If text box contains "FLU-xxxxx" send mail to "JL@xxxxx.com"

If text box contains "MTG-xxxx" send mail to "GB@xxxx.com"

and ect.

 

I try to find the function contains, but nothing on it.

 

Could you please help me.

 

Thanks for feedback.

 

Mick 

1 ACCEPTED SOLUTION

Accepted Solutions
MickNaul
New Member

Hi Tim,

 

Thanks so much for your reactivity and tour helps, yes it's working as mentionned.

 

Thanks again.

 

Mick

View solution in original post

4 REPLIES 4
timl
Super User
Super User

@MickNaul 

The syntax for this would look something like this:

If("FLU-xxxxx" in TextBox1.Text,
   Office365Outlook.SendEmailV2("JL@xxxxx.com", 
                             "Email title", 
                             "Email message"
   )
);
If("MTG-xxxxx" in TextBox1.Text,
   Office365Outlook.SendEmailV2("GB@xxxxx.com", 
                             "Email title", 
                             "Email message"
   )
);

 

MickNaul
New Member

Hello Tim, 

 

First thanks for feedback, your right, It's look likes something like that, but what I would like to integrate in this proposition is "contains" :

 

If  textInput contains "flup" then send mail to someone.

And if textinput contains "MTG" then send mail to someone else.

 

the Text can't be only FLU-xxxxx.

 

thanks for help

Mick 

timl
Super User
Super User

The 'in' operator carries out a contains match.

Therefore, the following will resolve to true when the textinput contains flup. Does that help?

"flup" in TextBox1.Text

 

MickNaul
New Member

Hi Tim,

 

Thanks so much for your reactivity and tour helps, yes it's working as mentionned.

 

Thanks again.

 

Mick

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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