Showing results for 
Search instead for 
Did you mean: 

Store multiple control values in a single Datacard



I am building an app to create timesheet entries using forms.I am using Common data service to store the data. I wanted to use multiple datepickers in a single data card to store values by row wise per each date. Would that be possible?


For below example, Date is DataCard1 and Billable hours is DataCard2 in a single form. (considered as one row in CDS database)










So, I have created 3 DatePickers in DataCard1 and 3 TextPickers in Datacard2. However, is it possible to store data by Date wise in database?

I am not sure whether we can use multiple controls in one datacard, if so how? Please someone help here?









Community Support Team
Community Support Team

Re: Store multiple control values in a single Datacard

Hi Nagaviswanath,


It seems that it is not possible to use multiple Date picker controls in a single data card to store values and write back to data source.
I would suggest you don’t use a Form control. Please consider to use Patch function to write data back to the data source.


According to your description, I created a connection from PowerApps to CDS.
>On a blank screen, add three Datepicker controls, say Datepicker5, Datepicker6, Datepicker7.
>Then add two Text input controls, say Textinput5, Textinput6.
>Add a Button control, name it as “Save”, and set its OnSelect property as:
Patch(Entity1,Defaults(Entity1),{Date1: DatePicker5.SelectedDate,Date2: DatePicker6.SelectedDate,Date3: DatePicker7.SelectedDate,Hours1:Value(TextInput5.Text),Hours2:Value(TextInput6.Text)})
Then when I click the button the Date and Hours will be saved to Entity1.



Please try to use Patch function to save data to the data source but not using a Form. Hope my steps could be a reference for you.
About Patch function, please check this documentation for a reference:


Please try if this works for you, and feel free reply if you need more help.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Store multiple control values in a single Datacard

Hello Mabel,


Thanks for your inputs, done few modifications and have started using Patch funtion for create/updation of the rows in the CDS. However, i am not able to update the multiple rows of data by clicking on 'SAVE' button. Please see below:PatchFunction_Error.png














I am using following function for SAVE button; OnSelect = Patch(TimeSheet_Week1,Defaults(TimeSheet_Week1),{Day: Value(TextBox8.Text),Worked: Value(TextInput1.Text),Vacation: Value(TextInput2.Text),Sick:Value(TextInput3.Text),Overtime: Value(TextInput4.Text),Client: Value(TextInput5.Text),Location: Value(TextInput6.Text)},{Day: Value(TextBox10.Text),Worked:Value (TextInput7.Text),Vacation: Value(TextInput8.Text), Sick:Value(TextInput9.Text), Overtime:Value(TextInput10:Text), Client:Value(TextInput11.Text), Location:Value(TextInput12.Text)})


Please can you help on this?





Re: Store multiple control values in a single Datacard



I don't want to update the existing records in the database, but multiple rows needs to be added to the database once i click on Save button. Please help on this.





Super User
Super User

Re: Store multiple control values in a single Datacard

Hey @Nagaviswanath



You can just use the Patch function like this:  Patch(TimeSheet_Week1,Defaults(TimeSheet_Week1),{Day: TextBox8.Text,...})

You don't need the Value() function for this operation.


Try to save it and then look in the OnSelect of the Save button to see if PowerApps doesn't give an error on the Patch function.


What entity are you using from the CDS?

I'll try and recreate your situation and let you know what my outcome is


Kind regards




Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

Re: Store multiple control values in a single Datacard

Hello Tom,


Yes i am using CDS as my database and i don't think we can use Datacards for my requirement. So i am using text input to store values.




Helpful resources


Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (5,657)