Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

MDA Command Bar Button Patch - Values Are Not Populated

(1) ShareShare
ReportReport
Posted on by 74
Background
  • One [Estimate] to many [Project Mat]
  • One [Estimate] to many [Production Item]
Project Mats have Units (decimal) and a Name (string).
Production Items have Units (decimal).
 
Challenge:
When in the [Estimate] main form, I want to be able to click a button that will create a new associated [Production Item], based on the properties of the first associated [Project Mat].
 
I created a Command Bar Power Fx button with this code:
With(
    {ProjectMat:First(Self.Selected.Item.'Project Mats')},
    Patch(
        'Production Items',
        Defaults('Production Items'),
        {
            Estimate: Self.Selected.Item,
            Units: ProjectMat.Units,        
            'Text Test': Text(ProjectMat.Name)
        }
    )
)
 
The Problem:
The newly created [Production Item] is correctly associated with the [Estimate], but Units and Text Test properties are always empty!
Note that all Project Mats have values for Name and Units. 
 
Any thoughts?
 
Suggestions to troubleshoot this will help me as well, because since my code is inside the DefaultCommandLibrary Component Library of the solution, I can't use Canvas App monitor to try figuring this out.
 
Thanks,
Gil
  • shalem120kjh Profile Picture
    74 on at
    MDA Command Bar Button Patch - Values Are Not Populated
    This question was mistakenly posted in the wrong forum before, now I hope it is in the correct place with the correct category.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard