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 

aadona
Frequent Visitor

THANK YOU SO MUCH

Drrickryp
Super User
Super User

Smilegif.gif

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,870)