cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Getting TextBox to Fill Sharepoint List to use Flow

Let me see if I can explain this Correctly.

 

An old employee made a form for a SharePoint list in PowerApps, without using the SharePoint Form. He made a Form Seperately in PowerApps, and using a Submit button is Patching the information into the SharePoint List columns.

 

I now need to add a new column to the SharePoint List to add an approval process, the easiest way we have done this in the past is to use Flow. This Auto generates a new column, immediately when a new item is created it puts it into a pending status, and send sthe email for approval. Here comes the issue.

 

He used a Text box to generate options in a gallery, and is then filling in an agents name in a label, based off the gallery selection. I now need to add another box to fill in the team lead for this agent and have my flow send the team lead an email for approval. 

 

In the OnChange of the Text Box I have set variables --

Set(EmployeeEmail,Gallery1.Selected.Mail);
Set(TeamLeadEmail,Office365Users.Manager(EmployeeEmail).Mail);

 

I have added a new text box with the Default set to:

Office365Users.Manager(EmployeeEmail).Mail

and the OnChange for this textbox to:

Patch(List name, Defaults(List Name),{'Team Lead Email':TextInput3.Text})

 

However, when I click submit, the Patch is seemingly not filling in the SharePoint Column fast enough for the Flow to recognize it needs to send the email to the Team leads Email for approval, so the flow is failing since it does not know who to assign the approval email to. Is there a better way to get Fill the data for the Team Leads Email?

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Agerde ,

 

In "Gallery1.Selected.Mail", is Mail the column name from SharePoint list? If so, what's its column type?

 

Also, try to use below formula directly instead of using a lot of variables.

Patch(List name, Defaults(List Name),{'Team Lead Email':Office365Users.Manager(Gallery1.Selected.Mail).Mail})

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @Agerde ,

 

In "Gallery1.Selected.Mail", is Mail the column name from SharePoint list? If so, what's its column type?

 

Also, try to use below formula directly instead of using a lot of variables.

Patch(List name, Defaults(List Name),{'Team Lead Email':Office365Users.Manager(Gallery1.Selected.Mail).Mail})

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (22,196)