cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AC889
New Member

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

 

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

 

View solution in original post

AC889
New Member

That works great. Thanks! 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (21,058)