cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CamH-NZQA
Frequent Visitor

Collect a list of email addresses, but in individual input fields

I'm relatively new to Power Apps, I'm quite familiar with SharePoint Lists and Power Automate.

I'm currently creating an app that was auto-generated from a SharePoint List. This app is to log requests and queries related to an internal system.

 

One part of this app asks if the user would like to request a drop in session for up to 20 people. There is a radio button input when the user selects Yes for a drop in session, when this is selected 3 DataCards are made visible, two "Requested Date" fields and a multi-line text input to list all the emails of those who should receive an invite for the drop in session.

 

I'm trying to make this app as fool proof and user friendly as possible as the people using it aren't always that tech savvy. With this in mind, I want to create individual input fields for each email address that a user wants invited to the drop in session. Currently all emails are just listed in a multi-line text input, each separated by a semi-colon. There is validation on this field to ensure emails are formatted properly and separated by a semi-colon, but I would prefer a series of text input fields, one email per field and perhaps having an "add another" button to provide another field for another email address. 

 

Any help would be greatly appreciated! Please let me know if you need any further explanation. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
MichelK
Resolver II
Resolver II

Hello @CamH-NZQA ,

 

You could use a Collection, a Gallery and a Text input field to solve your issue:

When the user inputs text in the Text input field and clicks on an OK button, you collect the email in a collection ( with a check on the email if necessary with IsMatch ) :

Collect( colEmails, {address:TextInput.Text} );
Reset( TextInput );

In the gallery, you display colEmails in the Items property, and you can add a delete icon in the gallery to allow the users to remove elements. ( Remove( colEmails, ThisItem) )

Then when the user validates the form you can access the list through colEmails. You could use the Concat function to join all the emails into a single text field with a set separator.

 

Let me know if this helps!

View solution in original post

2 REPLIES 2
MichelK
Resolver II
Resolver II

Hello @CamH-NZQA ,

 

You could use a Collection, a Gallery and a Text input field to solve your issue:

When the user inputs text in the Text input field and clicks on an OK button, you collect the email in a collection ( with a check on the email if necessary with IsMatch ) :

Collect( colEmails, {address:TextInput.Text} );
Reset( TextInput );

In the gallery, you display colEmails in the Items property, and you can add a delete icon in the gallery to allow the users to remove elements. ( Remove( colEmails, ThisItem) )

Then when the user validates the form you can access the list through colEmails. You could use the Concat function to join all the emails into a single text field with a set separator.

 

Let me know if this helps!

CamH-NZQA
Frequent Visitor

@MichelK Thank you for your help! I'm still learning a lot of Power Apps, so took me a while to integrate this into the app correctly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,204)