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

Power App date column updating default todays' date

Hello All,

I am using the power app to calculate students' absentee. 

the columns I am using are "Date Absent from", Expected return Date" and "Date returned to Boarding" 

1. when a student is absent, the admin registers their absentee with selection of "Date Absent from " and Expected return date"

2. but when a student actually returns to boarding,  to get exact days of absence, the admin selects a date in "Date returned to Boarding".  

my issue is,  during 1st step of recording absentee the time when I press submit button, I am patching the record in my list.

and during the 2nd step, i am only entering dates in " Date returned to Boarding", but in my List "Date Absent from" is by default showing me today's date. 

 

what I want: I want the "Date Absent from" field should show the last updated date for that student. so that I can use this date to calculate the total absent days.

 

rahul123_0-1659679759119.png

 

any help will be appreciated. 

 

kind regards

 

3 REPLIES 3
NandiniBhagya20
Solution Sage
Solution Sage

Hi,
Could you please share the formula which you have added on Default property of Date fields


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

All the date columns are "Datepicker" Type Date and Time

to calculate " No. of Days Absent" I am using 

=IF(ISERROR(DATEDIF([Date Absent from],[Date returned to Boarding],"d")),"",(DATEDIF([Date Absent from],[Date returned to Boarding],"d"))+1-INT(DATEDIF([Date Absent from],[Date returned to Boarding],"d")/7)*2-IF((WEEKDAY([Date returned to Boarding])-WEEKDAY([Date Absent from]))<0,2,0)-IF(OR(AND(WEEKDAY([Date returned to Boarding])=7,WEEKDAY([Date Absent from])=7),AND(WEEKDAY([Date returned to Boarding])=1,WEEKDAY([Date Absent from])=1)),1,0)-IF(AND(WEEKDAY([Date Absent from])=1,(WEEKDAY([Date returned to Boarding])-WEEKDAY([Date Absent from]))>0),1,0)-IF(AND(NOT(WEEKDAY([Date Absent from])=7),WEEKDAY([Date returned to Boarding])=7),1,0))

 

rahul123
Frequent Visitor

Hello @NandiniBhagya20 , have you got a chance to look into my issue?

 

thank you 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,689)