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 Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,137)