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

Notifications

Announcements

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 94
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
    94 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard