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)?
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,
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
|
stampcoin
15
ankit_singhal
11
Super User 2025 Season 1
mmbr1606
9
Super User 2025 Season 1