Hello - I'm new to PowerApps, but I've been able to figure out a lot of things using this forum (thanks!) and google searches. I'm building an expense report, which uses a form (for the report) and a gallery (for the line items), and I'm running into a snag that has me stumped.
The gallery has a number of input fields: a DatePicker, a DropDown for category, and then a number of text fields. When I save the row, the correct values are patching to the collection, BUT they reset to the default on the screen. I can't figure out how to get the DatePicker and DropDown fields to retain their original value on the screen. The user is going to think the wrong data will submit in the report.
Here's the code that I'm using to patch the line to the collection and add a new line. Anything jump out in there?
Patch(ExpenseCollection,ThisItem,{LineItem: InputItem.Text,LineCost: Value(InputCost.Text),Miles: Value(InputMiles.Text),MilesCost: Value(CalcMileage.Text),ExpDate:DatePicker1.SelectedDate,Category:Dropdown1.Selected.Value,ShowSaveButton:false}); Collect(ExpenseCollection,{LineItem:"",LineCost: 0,Miles: 0,MilesCost: 0,Category:"",ExpDate:Today(),ShowSaveButton: true})
Or do I perhaps need to do something on the Dropdown and DatePicker properties? I'm at a loss here.
Thanks for any help you can offer!