cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AC889
Regular Visitor

Default values

I'm having trouble assigning default values in a canvas app that uses a dataverse table to store the data. This is creating an app from within Microsoft Teams. 

 

I'm using the form that is created by first creating a dataverse table and then a form is automatically created. What I would like to do is to click the plus icon and then have some values auto fill some of the fields. 

 

The form is an edit form and the fields are enclosed with datacards. 

 

For instance, with a date picker I can I can modify the InitialPickerDate that shows either today's date or a date in the past or future. However I cannot figure out how to populate the text portion of the date picker with that same initial date as shown when clicking the calendar portion of the field. 

 

I'm having a similar issue with not being able to set the initial values of text input fields when adding a new record. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @AC889,

Do you want to populate the DatePicker with a specific date when you create a new record?

Could you please tell me that how you set the InitialPickerDate?

Actually, how you set the DefaultDate property of the DatePicker decides which day will be populated with. I just assume that you want to set the InitialPickerDate as Today, please try as below.

By the way, I suggest that you switch to the Classic mode when you work in the Power Apps for Teams.

v-qiaqi-msft_0-1623376894724.png

Set the Value of the DatePicker as below:

If(EditForm1.Mode=New,Today(),Parent.Default) // It will be populated with today once your form in a New mode

Set the Value of the TextInput as below:

If(EditForm1.Mode=New,"Test1",Parent.Default) // It will be populated with Test1 once your form in a New mode

Check if this could help.

Regards,

QI

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi @AC889,

Do you want to populate the DatePicker with a specific date when you create a new record?

Could you please tell me that how you set the InitialPickerDate?

Actually, how you set the DefaultDate property of the DatePicker decides which day will be populated with. I just assume that you want to set the InitialPickerDate as Today, please try as below.

By the way, I suggest that you switch to the Classic mode when you work in the Power Apps for Teams.

v-qiaqi-msft_0-1623376894724.png

Set the Value of the DatePicker as below:

If(EditForm1.Mode=New,Today(),Parent.Default) // It will be populated with today once your form in a New mode

Set the Value of the TextInput as below:

If(EditForm1.Mode=New,"Test1",Parent.Default) // It will be populated with Test1 once your form in a New mode

Check if this could help.

Regards,

QI

 

Best Regards,
Qi

View solution in original post

AC889
Regular Visitor

That works great. Thanks! 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,913)