Reputation: 49
I created the Powerapps form below. My goal is to have a user fill out this form, click Save, and have the data appended to an Excel file.
I connected the individual drop down boxes to a SQL database. The drop downs all work correctly and show the data that I want the user to choose from.
I don't understand how to take the data from this form and append the data to an existing Excel spreadsheet. I saw something that said I had to make a Collection out of it and I think that part worked. But the next step said to use the Patch function and I keep getting errors referencing the drop down values in the Patch statement. It accepts the text fields, just not the drop downs. Is there a better way to accomplish what I'm trying to do? I am winging it with Powerapps and it's hard to find specific information on what I'm trying to do.
Thanks for any help.
Collect
( MyItems,
{LocIdC: LocationId.SelectedText, CatIdC: CategoryIdSelected.SelectedText, SubCatIdC: SubCategoryId.SelectedText,
ClientIdC: ClientId.SelectedText, EventIdC: EventId.Text, CharityIdC: CharityId.SelectedText,
DateSelectedC: DateSelected.SelectedDate, WeightC: WeightTons.Text, UnitsC: Units.Text, DollarsC: Dollars.Text } );
ClearCollect(myCSV, {csvString:"LocIdC,CatIdC,SubCatIdC,ClientIdC,EventIdC,CharityIdC,DateSelectedC,WeightC,UnitsC,DollarsC"&Char(10)});
ForAll( MyItems, Patch( myCSV, First(myCSV), {csvString: First(myCSV).csvString&LocIdC&","&CatIdC&","&SubCatIdC&","&ClientIdC&","&EventIdC&","&CharityIdC&","&DateSelectedC&","&WeightC&","&UnitsC&","&DollarsC&Char(10)}) );
Upvotes: 0
Views: 1506