cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Agerde
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
v-monli-msft
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
v-monli-msft
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (26,568)