I am working on a tutorial from Microsoft Learn Website Create an expense report app from start to finish in Power Apps . I created a Choices called Choices Expense Report Status (as per the instructions) (name cr4fe_choicesexpensereportstatus). On the Exercise - Write to the Expense Report section, we are writing logic to the Save as Draft button the following:
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'.Draft], Traveler: LookUp( Users, 'Primary Email' = VarUser.Email ) } ) )
For the Report Status section, I am getting an error "The type of this argument 'cr4fe_reportstatus' does not match the expected type "OptionSetValue' (Choices Expense Report Status). Found type 'Table".
I tried 'Report Status':[Choices('Choices Expense Report Status'.Draft)], but still get the same error.
I have done this tutorial twice figuring I made a mistake but same issue.