cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Using choice column value to email users

Hello,

I have a canvas app and SPO as my data source.

I have a SPO field, which is a choice column. The choices are 5 different users, but of course they are not person fields.

What I would like is the ability for a user to come to my PowerApps form, select an approver from the preselected approvers (1 out of the 5 users) and that approver be emailed and the next screen I can then disable for all other users but this 1 approver.

I had created a combobox with 5 different emails as the choice, in my form, but it appears that doesn't save its data to choice column in SPO.

But also unsure if I can use an entry in a combobox to determine if the CurrentUser is the approver?

I hope I have explained what I'm trying to do?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Using choice column value to email users

@G99 
I like your method: it is possible to do with a Choices column.  Here's how:

 

Put this code in the Items property of your dropdown (not a ComboBox).

[
  "Approver1@yourcompany.com",
  "Approver2@yourcompany.com",
  "Approver3@yourcompany.com",
  "Approver4@yourcompany.com",
  "Approver5@yourcompany.com",
]

 

Then put this code in the Update property of the Card.

{Value: Dropdown_ApproverEmail.Text}

 

When the form is submitted the value will now be written to the ApproverEmail Choices field.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: Using choice column value to email users

@G99 
I like your method: it is possible to do with a Choices column.  Here's how:

 

Put this code in the Items property of your dropdown (not a ComboBox).

[
  "Approver1@yourcompany.com",
  "Approver2@yourcompany.com",
  "Approver3@yourcompany.com",
  "Approver4@yourcompany.com",
  "Approver5@yourcompany.com",
]

 

Then put this code in the Update property of the Card.

{Value: Dropdown_ApproverEmail.Text}

 

When the form is submitted the value will now be written to the ApproverEmail Choices field.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Community Support
Community Support

Re: Using choice column value to email users

Hi  @G99 ,

 

Could you please share the Items property of combo box and the Update property of Data card?

To save the selected email to SP list, please try this:

1. Set Combobox.Item:

Choices('SP list'.'ChoiceColumnName')

2. Set Update property of Data Card:

LookUp(Choices('SP list'.'ChoiceColumnName'),Value=ComboboxName.Selected.Value)

 

To your next requirement, you can add a label inside the data card, set Text property as below to remind user that you are one of Approvers.

If(User().Email in Choices('SP list'.'ChoiceColumnName').Value, "You're one of the approvers")

Hope this helps.

Sik

Highlighted
Post Prodigy
Post Prodigy

Re: Using choice column value to email users

@mdevaney 

 

Thanks for your reply.

I've deleted the data card added in the field from my data source, did not delete the original data card field, but changed the code in the Items property of the original dropdown to what you suggested and it appears I do not need to change any code in the update property of the card, it seems to write the value back to SPO, based on the original code in the Update property:

 

DataCardValue7.Selected

 

 

Highlighted
Post Prodigy
Post Prodigy

Re: Using choice column value to email users

 

I've got past the emailing of the user from that screen.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,901)