Announcements
Hi!
I am trying to use PowerFX to create a button that in the following creates a record and pre-fills certain fields. I got no experience with Power Apps or PowerFX thus I dont know how the syntax is written properly to achieve this requirement.
Maybe anyone could help me out!
Thanks in advance!
We need a bit more information to be able to help you with the syntax.
@Pstork1 Hi!
Thanks for reaching out!
Hi @Anonymous,
Have you looked into Business Rules to see if that can accomplish your needs? You can set default values on fields based on simple criteria. Note that with business rules you can't evaluate values on related records.
If your business logic needs to be a bit more complex and look at related parent or child records, you can use a Power FX command button to perform business logic. You can also use JavaScript if PowerFX commands can't achieve the behavior.
Have a review of the links and see if those will work for you. You'd need to provide a bit more details on what your business logic needs to do based on what criteria, so that we can advise on the best approach.
---Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.
Hi @ChrisPiasecki !
I already created a button with PowerFX, yet I am not sure how to write the formular properly for my requirement.
I want to know how the formular is written properly in order to create and pre-fill a record. If you could give me an example of the formula I could adapt it.
I just dont know which commands are used to create records and which are used to set values on a record.
Basically there is no specific criteria, it is only for usability so that users can create a webpage for the dynamics portal within a CE App without having to fill out fields that stay the same all the time. Afterwards I will lock these fields on the form so they cant change the default website for example.
.
Hi @Anonymous, you're looking for Patch.
Microsoft Document: https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-patch
Example Formula for new records to be created:
Patch( Customers, Defaults( Customers ), { Name: "Contoso" } )
In the curly brackets, add the fields you want separated by commas and the default information you want filled in. Working with the different types can be a little tricky depending on what you want filled, an easy way to test your formula is to use the Helper Screen in the component library screens or setup a canvas app and add the table.
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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 431
WarrenBelz 360 Most Valuable Professional
Kalathiya 280 Super User 2026 Season 1