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

Data Card with Date Picker and Time

Hello, 

 

I have a data card with a date picker and time selector in my form. If the user is entering a new event, I want the default value of the date to be today. If a user is viewing an existing record, I want the form to show the recorded date.

 

I stopped using the new mode for forms so my old formula If(FormISDTeamInfo.Mode = FormMode.New,Today(),ThisItem.XXX) does not work anymore.

 

Do you know of a workaround to achieve what I'm trying to do?

 

Thanks everyone!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@aadona 

Coalesce(Parent.Default, Today())

If the Parent.Default is blank, then Today() will be used. If you didn't want to allow the user to change it, you could simply put that formula in the Update property of the card itself, put a label in the card with its Text as Parent.Default  and hide the datepicker 

View solution in original post

3 REPLIES 3
Drrickryp
Super User
Super User

@aadona 

Coalesce(Parent.Default, Today())

If the Parent.Default is blank, then Today() will be used. If you didn't want to allow the user to change it, you could simply put that formula in the Update property of the card itself, put a label in the card with its Text as Parent.Default  and hide the datepicker 

View solution in original post

aadona
Frequent Visitor

THANK YOU SO MUCH

Drrickryp
Super User
Super User

Smilegif.gif

 

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,326)