cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Splitting two email addresses

Hi everyone !  

 

Does someone know how to split email adresses with ";" in a textbox? 

Actually I saved the email address that's written, but when I write 2 or more email addresses with ";", it doesn't save into 2 different mails. 

 

Screenshot 2022-04-21 at 10.53.57.png

 

My code is as follow: 

TextBox: 

OnChange = ClearCollect(collectionEmail; txtEmail.Text);;

                      // I tried different codes, it doesn't give an error but doesn't store it as 2 email addresses 

                      Right(txtEmail.Text; Find(";"; txtEmail.Text)) 

                      Concat(Split(Text(txtEmail.Text); ";"); Result) 

                      (Last(FirstN(Split(txtEmail.Text; ";"); 1)).Result)

                      First(Split(txtEmail.Text; ";")).Result

 

Label

Text = If(IsMatch(txtEmail.Text; Email) = false; "Invalid email"; "")

 

Can anyone help me? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
alaabitar
Solution Specialist
Solution Specialist

Hello mimii,

 

Can you just try this one please

ClearCollect(collectionEmail,Split(txtEmail.Text,";"))

 

Best regards,

Alaa

View solution in original post

3 REPLIES 3
alaabitar
Solution Specialist
Solution Specialist

Hello mimii,

 

Can you just try this one please

ClearCollect(collectionEmail,Split(txtEmail.Text,";"))

 

Best regards,

Alaa

Anonymous
Not applicable

Hello @alaabitar

 

Thanks for your reply! 

When i'm writing the email addresses, I can now see that they are separated in my combobox. Actually, this works good thank you! 

Screenshot 2022-04-21 at 15.59.27.png

Screenshot 2022-04-21 at 15.59.39.png

 

The only problem that I have now is to save them in SharePoint. I have no idea why this doesn't work anymore. The problem is with EmailAdres in de patch function. Could you help me? 

  

SubmitForm(Form2);;

ForAll(
    collectionEmail;
    Collect(
        colNewItems;
        Patch(
            SharePoint_list1;
            Defaults(SharePoint_list1);
            {
                Title: Text(Form.LastSubmit.'Id (ID)');
                EmailAdres: Text(txtEmail.Text)
            }
        )
    )
)

 

Anonymous
Not applicable

I found the solution to save it 🙂 

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,090)