cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
supersonicevan
Frequent Visitor

PowerApps Expense Report Template User Filtering

How does PowerApps handle user-specific content filtering for this app?

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/expense-report-install
The app only shows open/pending/approved expense reports submitted by the logged-in user; how is this filtered?

 

I don't like the standard approval process because it doesn't provide details to the approver and I dont' want them messing around with my Sharepoint list directly.

I want to create a clone of the expense app and change the filter from user-created to designated approver. Then I'll have an approvals app that can be used to check unapproved expense reports and view their details.

16 REPLIES 16

Hi @K-A-R-L , yes I am using sharepoint datasource, I tried to replace the space with "x0020",but still it does not allow me to use that field (Created_x0020_By), Created By field stores the full name of the user who created the specific expense report. by the way I did not add that field in the Expense List i think it was a default field, am I missing something?

 

Thanks!

K-A-R-L
Solution Specialist
Solution Specialist

@biglilb0y,

Could you please provide a screenshot?

Or try using: ThisItem.Author.DisplayName 

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

Hi @K-A-R-L 

 

here is the screenshot of the filter that i was trying to add at Expense Gallery.

expense001.png

 

 

 

 

 

 

 

 

 

 

 

 

 

here are the fields from the Expense List.

expense002.png

 

 

 

 

 

 

 

 

 

and the property of the Created By field.

 

expense003.png

 

should the ThisItem.Author.DisplayName as replacement for the Created By in the filter, may i know how to use that?

 

Thanks!

 

 

 

 

 

K-A-R-L
Solution Specialist
Solution Specialist

Hi @biglilb0y ,

As per your screenshot below:

screen-pa.jpg

 

It seems like you're adding the Filter() code on the OnVisible() property of the My Expenses Screen instead on the Items() Property of the Gallery.

 

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

 

 

Hi @K-A-R-L ,

 

I was able to add the Author.DisplayName = Createdby in ExpenseGallery Item() and its working perfectly, however the expense summary group still displaying all the expenses created in the organization.

 

expense004.png

 

 

 

 

 

 

 

 

Thanks!

K-A-R-L
Solution Specialist
Solution Specialist

Hi @biglilb0y ,

On your LabelOpenValue change the Text() Property to:

"$" & If(
    Sum(
        Filter(
            LineItems,
            ReportID.Id in OpenReports.ID && Author.DisplayName = User().FullName
        ),
        Cost
    ) > 0,
    Text(
        Sum(
            Filter(
                LineItems,
                ReportID.Id in OpenReports.ID && Author.DisplayName = User().FullName
            ),
            Cost
        ),
        "[$-en-US]#,###.00"
    ),
    0
)

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Thank you so much @K-A-R-L ! My expense report is now working! Excellent!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,592)