web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : sbtoR56K46subt8Nz2m7LS
Power Apps - Microsoft Dataverse
Answered

New Form 'Item' - can this be the result of call to 'Defaults'?

Like (0) ShareShare
ReportReport
Posted on 1 Sep 2022 20:49:48 by 377

I'm trying to get a New Form working for a child Dataverse table. There are many defaults that should be set - some are the current date and current user, others would be set from the parent record.

 

Rather than implementing the 'If(Parent.FormMode=New, ... , ...)' pattern on every Form control's Default property, does it make sense to create a new record using the 'Defaults()' function, and pass that into the form as a Context Variable? If so, should the Form be set into 'New' mode, or 'Edit' mode (since it's receiving an Item, rather than being asked to create it's own default item)?

 

  • Verified answer
    v-jefferni Profile Picture
    on 08 Sep 2022 at 06:32:43
    Re: New Form 'Item' - can this be the result of call to 'Defaults'?

    Hi @LenC ,

     

    Actually Defaults(DataSource) will pre-populate the form with the default values set in that data source, not in the App.

     

    Check the doc link below:

    Defaults function in Power Apps - Power Platform | Microsoft Docs

     

    Best regards,

  • AhmedSalih Profile Picture
    6,678 Moderator on 02 Sep 2022 at 13:18:42
    Re: New Form 'Item' - can this be the result of call to 'Defaults'?

    Good morning, @LenC , I am not sure If I clearly understand your question. But to use the Edit mode of the Form, the record that you are passing for the Form to be referenced by the Item property must be an existing record in the Data source.

     

     

    If my reply helped you, please give a đź‘Ť , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Featured topics

Loading complete