web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Expense Report error o...
Power Apps
Unanswered

Expense Report error on the Submit and Draft Buttons....PLEASE HELP!!!!

(0) ShareShare
ReportReport
Posted on by 2

Hi,

 

I am attempting to create an expense report app and followed the step by step instructions on the Microsoft learning site.  I completed everything but I have errors on my Submit and Draft buttons.  I copied the formulas right from the training, yet I am getting errors and cannot use the app properly.  PLEASE HELP!  Below is the Formula and error msg I get for the Submit button.  Thank you!

 

Set(
VarExpense,
Patch(
'Expense Reports',
If(
VarExpenseMode = "New",
Defaults('Expense Reports'),
VarExpense
),
{
'Trip Destination': Txt_Destination_EditExpense.Text,
'Departure Date': Dte_Departure_EditExpense.SelectedDate,
'Arrival Date': Dte_Arrival_EditExpense.SelectedDate,
'Report Status': ['Report Status'.'Awaiting approval'],
Traveler: LookUp(
Users,
'Primary Email' = VarUser.Email
)
}
)
)
; RemoveIf(
'Expense Report Details',
'Expense Report'.'Expense Report' = VarExpense.'Expense Report'
);
ForAll(
Gal_ExpenseDetails_EditExpense.AllItems,
Patch(
'Expense Report Details',
Defaults('Expense Report Details'),
{
Expense: Txt_Expense_EditExpense.Text,
Category: Ddn_Category_EditExpense.Selected.Value,
'Transaction Date': Dte_TransactionDate_EditExpense.SelectedDate,
Amount: Value(Txt_Amount_EditExpense.Text),
'Expense Report': LookUp(
'Expense Reports',
'Expense Report' = VarExpense.'Expense Report'
)
}
)
); Office365Outlook.SendEmailV2(
VarUser.Email,
"An Expense Report is Ready for Review",
VarUser.FullName & " has submitted a new expense report for your review. Please visit the expense report app to see the details."
)

 

 

image.png
Categories:
I have the same question (0)
  • Melissa1111 Profile Picture
    2 on at

    To be clear it is this part of the formula that I am getting the error msg.

     

     

    Set(
    VarExpense,
    Patch(
    'Expense Reports',
    If(
    VarExpenseMode = "New",
    Defaults('Expense Reports'),
    VarExpense
    ),
    {
    'Trip Destination': Txt_Destination_EditExpense.Text,
    'Departure Date': Dte_Departure_EditExpense.SelectedDate,
    'Arrival Date': Dte_Arrival_EditExpense.SelectedDate,
    'Report Status': ['Report Status'.'Awaiting approval'],
    Traveler: LookUp(
    Users,
    'Primary Email' = VarUser.Email
    )
    }
    )
    )

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard