cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asdeev
Level: Powered On

Having managers see the approved or rejected forms in powerapps Form App

Hi Guys,

 

I was wondering if there a way in the App for the managers to see what forms they have approved or rejected??

I have a form for users to submit work orders and managers get emails they approve or reject it but Is there a way I can somehow create a button or something for the managers to see what forms they have had approved or rejected ?

 

I hope this is making sense. Any ideas are highly appreciated!!

 

Thanks alot!

3 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Having managers see the approved or rejected forms in powerapps Form App

This is just one way of doing it -

 

First, create a column "Approved by" in your data source where you are saving the work orders.

 

When the manager approves a work order, which I am guessing you are using a Flow for, you can add an action to update the "Approved by" value to the manager's email address. 

 

In the app, you can create a manager section, which only managers can view and here you can show which work orders they approved by using the Filter function - 

Filter(WorkOrders, 'Approved by' = User.Email()) 

Edit - it should be Filter(WorkOrders, 'Approved by' = User().Email) 

 

Hope this helps. Let me know if you have any questions.

 

 

Thanks

Vivek Bavishi / That API Guy

Twitter | YouTube | Blog

 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



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

asdeev
Level: Powered On

Re: Having managers see the approved or rejected forms in powerapps Form App

wow! that works like magic! I just used the UserEmail instead of User().Email since I have already defined it in my app. It works flawlessly. 

 

I am also thinking to have another button somewhere as "SHOW ALL" which should take me back (out of Managers record button) to the original gallery with current users submitted form. Do I use filter function on that?

View solution in original post

Super User
Super User

Re: Having managers see the approved or rejected forms in powerapps Form App


@asdeev wrote:

wow! that works like magic! I just used the UserEmail instead of User().Email since I have already defined it in my app. It works flawlessly. 

 

I am also thinking to have another button somewhere as "SHOW ALL" which should take me back (out of Managers record button) to the original gallery with current users submitted form. Do I use filter function on that?


Awesome! glad it worked.

 

And yes , for "Show All" button, set the OnSelect Property to Set(FilteredWorkOrders,'[dbo].[JHA_APP]') so that you can see all the work orders. you could also use sort within that statement if required.

 

Also, can you accept the previous reply as the solution.

 

Thanks

Vivek Bavishi / That API Guy

Twitter | YouTube | Blog


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



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

16 REPLIES 16
Super User
Super User

Re: Having managers see the approved or rejected forms in powerapps Form App

This is just one way of doing it -

 

First, create a column "Approved by" in your data source where you are saving the work orders.

 

When the manager approves a work order, which I am guessing you are using a Flow for, you can add an action to update the "Approved by" value to the manager's email address. 

 

In the app, you can create a manager section, which only managers can view and here you can show which work orders they approved by using the Filter function - 

Filter(WorkOrders, 'Approved by' = User.Email()) 

Edit - it should be Filter(WorkOrders, 'Approved by' = User().Email) 

 

Hope this helps. Let me know if you have any questions.

 

 

Thanks

Vivek Bavishi / That API Guy

Twitter | YouTube | Blog

 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



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

asdeev
Level: Powered On

Re: Having managers see the approved or rejected forms in powerapps Form App

Thanks for your response.I already have ManagerAlias coloumn in my table which stores the information of all approvers.(basically managers)

 

and yes I use the flow for approvals.

 

I inserted a button in the gallery of my app called Manager's record ( I am not sure if this is right) but I only want this to be seen by managers How can I do that?

 

Like you said I created a filter on the button onselect property:  Filter('[dbo].[JHA_APP]',ManagerAlias= User.Email()) - the error I am getting is inovation of unknown and unsupported text.

 

Please see the attached.

 

It shows 

Super User
Super User

Re: Having managers see the approved or rejected forms in powerapps Form App

My bad , it should be User().Email


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

asdeev
Level: Powered On

Re: Having managers see the approved or rejected forms in powerapps Form App

It gives me delegation warning (Please see ataached) .

Super User
Super User

Re: Having managers see the approved or rejected forms in powerapps Form App

And for your dilemma on whether to use manager's record button, I believe you could set the visible property to true only if the logged in user is in the list of managers . Let me know if you would like to understand the formula for that.(probably a lookup function)

 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User
Super User

Re: Having managers see the approved or rejected forms in powerapps Form App


@asdeev wrote:

It gives me delegation warning (Please see ataached) .


As per this documentation https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-list , it should be delegable and you shouldn't get a warning. 

 

Is it working though with the warning?


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
asdeev
Level: Powered On

Re: Having managers see the approved or rejected forms in powerapps Form App

That would be very helpful. I havent used lookups before so if I can get an example on how to use the formula , that would be great and I really appreciate your time.

 

Thanks!

asdeev
Level: Powered On

Re: Having managers see the approved or rejected forms in powerapps Form App

I dont see the results. Do you think I should have a filter on gallery too? Right now my gallery filters based on the current logged in users only and I have added another button for managers record with the above formula.

 

Will that affect the button functionality?

 

I have attached the picture of gallery screen

Super User
Super User

Re: Having managers see the approved or rejected forms in powerapps Form App


@asdeev wrote:

That would be very helpful. I havent used lookups before so if I can get an example on how to use the formula , that would be great and I really appreciate your time.

 

Thanks!


Firstly, lets take a step back and understand how are you filtering the gallery when the manager clicks on the button.

 

Right now, the filter formula won't work as you are not filtering the gallery items based on the formula. 

 

1. Set the Gallery Items to some variable - FilteredWorkOrders

 

2. Then onvisible property of the screen, use the formula Set(FilteredWorkOrders, your gallery items formula that you have currently)

 

3. Then for the OnSelect property of the Manager button, use this - Set(FilteredWorkOrders, the filter formula that you are using for the button)

 

4. for the visible property of the Managers button , use this - If(IsBlank(Filter('[dbo].[JHA_APP]','ManagerAlias'=User().Email)),false,true)

Which means if the user who logged in has atleast one record that they approved, the button will be visible otherwise it won't.

 

Hope this helps.


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,790)