cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lalmonte
Level: Powered On

Check-in / out child for summer camp

I have built a summer camp app to allow the checking in and checking out of children. the data is in sql and when i added my form it automatically created a date time picker for each date field i have ( I have 5 , Monday - Friday) .

 

what i would like to do is convert those 5  date time pickers to button , that when clicked can save the current date time to sql for that field.

 

also if the button has been clicked then it should grey out since it means that the child has been checked in for that date. 

3 ACCEPTED SOLUTIONS

Accepted Solutions
PauwelsSven
Level 8

Re: Check-in / out child for summer camp

Hi,

 

On every button you make:

OnSelect = Patch(RecordID (=specific row in sql) , {datefield (out of sql): Now()})

DisplayMode = if(DateField.Date <> "", DisplayMode.Edit, DisplayMode.View)

Fill = if(DateField.Date <> "", Color, Grey)

Community Support Team
Community Support Team

Re: Check-in / out child for summer camp

Hi @lalmonte,

Could you please share a screenshot about your app's configuration?

How do you want to submit your form data into your sql table? Using SubmitForm function or Patch function?

If you want to convert the Date Picker control into a button, you should unlock the corresponding Date field Data card, then remove the Date Picker control from it, and add a Button control within it. Please check the following GIF screenshot for more details:Test1.gif

I have made a test on my side, please take a try with the following workaround:1.JPG

 

2.JPG

Set the OnVisible property of the first screen of your app to following:

Set(IsClicked, false)

Within the Edit form, set the OnSelect property of the "Monday" button to following:

Set(IsClicked, true);
Set(CurrentTime, Now());
SubmitForm(EditForm1)

Set the DisplayMode property of the "Monday" button to following:

If(IsClicked=true || ThisItem.Monday <> Blank(), DisplayMode.Disabled, DisplayMode.Edit) /*<- Monday represents the Monday date column in your SQL table */

Set the Update property of the Monday Data card which contains the "Monday" Button control to following:

CurrentTime

Note: Same formula for other 4 buttons -- Tuesday, Wednesday, Thursday and Friday button within corresponding field data card.

The GIF screenshot as below:Test1.gif

 

Best regards,

Kris

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

Re: Check-in / out child for summer camp

Hi @lalmonte,

Based on the needs that you provided, I think the solution I provided above could achieve your needs.

Update -- Set the Text property of the "Monday" button to following:

If(ThisItem.Monday<>Blank(), "Monday"&Char(10)&ThisItem.Monday, "Monday") /* <- Monday represents the Monday Date time column in your SQL table */

6.JPG

Please take a try with above solution I provided, then check if your issue is solved.

 

Best regards,

Kris 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
PauwelsSven
Level 8

Re: Check-in / out child for summer camp

Hi,

 

On every button you make:

OnSelect = Patch(RecordID (=specific row in sql) , {datefield (out of sql): Now()})

DisplayMode = if(DateField.Date <> "", DisplayMode.Edit, DisplayMode.View)

Fill = if(DateField.Date <> "", Color, Grey)

Community Support Team
Community Support Team

Re: Check-in / out child for summer camp

Hi @lalmonte,

Could you please share a screenshot about your app's configuration?

How do you want to submit your form data into your sql table? Using SubmitForm function or Patch function?

If you want to convert the Date Picker control into a button, you should unlock the corresponding Date field Data card, then remove the Date Picker control from it, and add a Button control within it. Please check the following GIF screenshot for more details:Test1.gif

I have made a test on my side, please take a try with the following workaround:1.JPG

 

2.JPG

Set the OnVisible property of the first screen of your app to following:

Set(IsClicked, false)

Within the Edit form, set the OnSelect property of the "Monday" button to following:

Set(IsClicked, true);
Set(CurrentTime, Now());
SubmitForm(EditForm1)

Set the DisplayMode property of the "Monday" button to following:

If(IsClicked=true || ThisItem.Monday <> Blank(), DisplayMode.Disabled, DisplayMode.Edit) /*<- Monday represents the Monday date column in your SQL table */

Set the Update property of the Monday Data card which contains the "Monday" Button control to following:

CurrentTime

Note: Same formula for other 4 buttons -- Tuesday, Wednesday, Thursday and Friday button within corresponding field data card.

The GIF screenshot as below:Test1.gif

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lalmonte
Level: Powered On

Re: Check-in / out child for summer camp

if possible I want it to look like this . each day is a button , labeled Monday thru Friday. If ive never clicked on the button , the corresponding field in SQL will be blank. If I click on the button then the date and time will be added and the button is now grayed out. If a button has not been clicked then it should just have the day of the week but no date or time . does this make sense ?

 

 

Community Support Team
Community Support Team

Re: Check-in / out child for summer camp

Hi @lalmonte,

Based on the needs that you provided, I think the solution I provided above could achieve your needs.

Update -- Set the Text property of the "Monday" button to following:

If(ThisItem.Monday<>Blank(), "Monday"&Char(10)&ThisItem.Monday, "Monday") /* <- Monday represents the Monday Date time column in your SQL table */

6.JPG

Please take a try with above solution I provided, then check if your issue is solved.

 

Best regards,

Kris 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lalmonte
Level: Powered On

Re: Check-in / out child for summer camp

Thank you so much . Apologize for the late reply , i went on vacation the day after this post and have terrible internet access . I’ve tested this and it seems to work

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 265 members 3,677 guests
Please welcome our newest community members: