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."
)

Report
All responses (
Answers (