cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Use checkboxes with date picker to update collection columns

Hi all,

 

I am not even sure if I can articulate this question, but I will do my best to see if this is possible.

 

I have a single Date Picker and multiple Checkboxes that I would like to use to update individual columns in a collection with the date value based on which checkboxes are selected. For example, I have the date picker set to July 20, 2020 and checkbox 1, 2, but not 3 selected. I would like a collection to update the corresponding column for checkbox 1 and 2 with July 20, 2020. Subsequently, by updating the date picker to July 22, 202 and checkbox 2,3 but not 1 selected, the columns have data added accordingly.

 

I am an absolute beginner, so please excuse my poor explanation and terminology! Thanks in advance,


Greg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Use checkboxes with date picker to update collection columns

Hi @deltaformtech ,


What is the relationship between Columns and Check boxes?

I would suggest you add a logic condition to check if the check box is checked, then save the selected date to columns.

For example:

Patch(
    CollectionName,
    First(CollectionName),
    If(
        Checkbox1.Value,
        {Column1:DatePicker1.SelectedDate}
    ),
    If(
        Checkbox2.Value,
        {Column2:DatePicker1.SelectedDate}
    ), 
    If(
        Checkbox3.Value,
        {Column3:DatePicker1.SelectedDate}
    )
)

Hope this helps.

Sik

 

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Use checkboxes with date picker to update collection columns

Hi @deltaformtech ,

Assuming the collection fields are data fields and the checkbox is withing a gallery based on the collection, you can Patch the dat as each box is checked. For example checkbox 1 OnCheck

 

Patch(
   YourCollection,
   ThisItem,
   {YourDateField:YourDataPickerName.SelectedDate}
)

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Community Support
Community Support

Re: Use checkboxes with date picker to update collection columns

Hi @deltaformtech ,


What is the relationship between Columns and Check boxes?

I would suggest you add a logic condition to check if the check box is checked, then save the selected date to columns.

For example:

Patch(
    CollectionName,
    First(CollectionName),
    If(
        Checkbox1.Value,
        {Column1:DatePicker1.SelectedDate}
    ),
    If(
        Checkbox2.Value,
        {Column2:DatePicker1.SelectedDate}
    ), 
    If(
        Checkbox3.Value,
        {Column3:DatePicker1.SelectedDate}
    )
)

Hope this helps.

Sik

 

View solution in original post

Highlighted
Frequent Visitor

Re: Use checkboxes with date picker to update collection columns

Hi Sik,

 

This did the trick!  Thank you so much.


Greg

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,894)