i am trying to update a text field with the current time and date when a checkbox is checked. I have tried to use onselect of button to do that but the formula i am using is not working properly. Then i want to update the record in my SQL database that the information is coming from. How would i make this possible?
Hi @RCSmart01,
Could you please share more details about how you would like to update the record in your SQL Database?
I will share an example here, about how to show the current time in a Label control when CheckBox checked.
1. Add a Label control, add a CheckBox control,
2. Under text property of the Label control, enter the following:
If(Checkbox1.Value=true,Now())
In this way, when the CheckBox is checked, the Label would show the current date and time.
If you would like to update the record in SQL Database with the current time, then you cuold take use of the patch function:
For example:
Patch(TableName, RecordNeedtoModify, {UpdatedRecordItem})
For the details usage of the patch() function, please check:
Regards,
Michael
Thanks for the reply, i want to apologize for i gave you wrong info, the field i want to update is a date/time field. Thanks for the patch function i am going to read on that and see if it is what i want.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
207 | |
97 | |
60 | |
51 | |
44 |
User | Count |
---|---|
257 | |
160 | |
85 | |
79 | |
58 |