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 / Patch Task table in a ...
Power Apps
Suggested Answer

Patch Task table in a command bar button on a custom table

(1) ShareShare
ReportReport
Posted on by 82
I have a custom table and an MD app. Now I want to create a command bar button (main form) that adds a record in the Task table. But when I use the function Patch I cannot choose the table Tasks, it's not visible.
 
I've created a relationship between my custom table and the tasks table. Published everything. Added the task table to the MD-app. But nothing works.
 
How can I create a task from a command bar button from a custom table?
 
Any help is appreciated.
I have the same question (0)
  • CU01080920-0 Profile Picture
    2 on at
    Anyone?
  • Suggested answer
    PANow Profile Picture
    6 on at
    Ensure that the Tasks table is in the component library data sources. You can select Open Component Library from he top right near the publish button when editing a button. When viewing the library, it's the same experience as a canvas app builder, without the canvas.
  • Suggested answer
    deepakmehta13a Profile Picture
    369 on at

    Hi @Ellen Heijmans,

    The reason you cannot see the Tasks table in your Patch function is that it hasn't been added to the command's data context, even if it is part of your Model-Driven App.

    To fix this using Power Fx:

    1. Open the Command Bar Editor for your main form.

    2. In the top menu, select Open Component Library.

    3. Once the library opens, go to the Data tab on the left.

    4. Click Add data and search for the Tasks table.

    5. Save and Publish the library, then go back to your command bar and the Patch(Tasks, ...) formula will now be recognized.


    Alternative: Using JavaScript
    If you prefer not to use Power Fx, you can use a JavaScript Web Resource. This is often more flexible for creating related records without navigating away from the page.

     

    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated

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 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard