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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / MDA Command Bar Button...
Power Apps
Unanswered

MDA Command Bar Button Patch - Values Are Not Populated

(1) ShareShare
ReportReport
Posted on by 105
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
Categories:
I have the same question (0)
  • shalem120kjh Profile Picture
    105 on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard