Introduction
This blogs focuses on how to add defaults to a SharePoint Customized (or PowerApps) form. The list in this demo includes all the column types including managed metadata. The video walks you through the steps in detail, however, this blog with the attached text file contains all the functions incase you want to copy and paste
This blogs focuses on how to add defaults to a SharePoint Customized (or PowerApps) form. The list in this demo includes all the column types including managed metadata. The video walks you through the steps in detail, however, this blog with the attached text file contains all the functions incase you want to copy and paste
SharePoint list
Here is a screenshot of the SharePoint list, the column types and names used in this demo. You will have to modify the function to match your lists and column names.
Here is a screenshot of the SharePoint list, the column types and names used in this demo. You will have to modify the function to match your lists and column names.
Choice type field
Pick a date (for date only)
Pick a date and time
Lookup (The video shows you the list from which the lookup values are pulled)
Yes or No
Hyperlink
Managed Metadata
Formulas
This contains the formulas used for the complex ones such as Choice type, User /Groups, Lookups and Managed
Metadata.
Choice type field
Example
Example
If(SharePointForm1.Mode = FormMode.New,
LookUp(
Choices('Add Defaults'.'Choice Type'),
Value = "Device #1"),
Parent.Default
)
LookUp(
Choices('Add Defaults'.'Choice Type'),
Value = "Device #1"),
Parent.Default
)
Users / Groups
Example
Example
If(
SharePointForm1.Mode = FormMode.New,
{
DisplayName: User().FullName,
Claims: "i:0#.f|membership|" & User().Email
},
Not(IsBlank(DisplayName)),
Parent.Default
)
Lookup
Example
If(
SharePointForm1.Mode = FormMode.New,
LookUp(
Choices('Add Defaults'.lookup),
Value = "Microsoft"),
Parent.Default
)
Managed Metadata
Example
If(
SharePointForm1.Mode = FormMode.New,
LookUp(
Choices('Add Defaults'.managedmetadata),
Label = "IT"),
Parent.Default
)
SharePointForm1.Mode = FormMode.New,
LookUp(
Choices('Add Defaults'.managedmetadata),
Label = "IT"),
Parent.Default
)
Video (This video walks you through the entire process step-by-step)
Conclusion
The formula's to add the default values is very similar to the formulas used in the Patch function. You can refer to the links below to see the two blogs I've written for the Patch Function.
Helpful Links
*This post is locked for comments