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 / Patch a new record fro...
Power Apps
Unanswered

Patch a new record from the command bar, lookup the value in a diffrent table model-driven app

(0) ShareShare
ReportReport
Posted on by 25

Hi everyone,

 

I need to patch a new record to the table trigger, this table has a Name and a Value. The value that I need to pass in the column Value is the value that I need to lookup from the table parameter. 

 

Their is no relationship (lookup column) between them and it is not possible to change this since this is a legacy project.

 

What I would normally do in a Canvas app is the following:

 

With({varValue: LookUp(Parameters,Name = "parameter1" ).Value},Patch(Triggers,Defaults(Triggers),{Name:"Test",Value:varValue}))

 

 

But this is my first time ever that I need to do it from the command bar in a model-driven app and I have no idea how to do this. How can I connect to an other datasource then the datasource that I'm currently using for edditing the command bar?

 

I hope someone could help me 😄 

I have the same question (0)
  • Verified answer
    RobinFierens1 Profile Picture
    25 on at

    After some more research I found the solution by myself via the Microsoft Documentation:

    https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/use-command-designer

    RobinFierens1_0-1712150090237.png

     

    Steps:

    1) Click on "Open component library"

    2) Go to screens

    3) Go to datasources

    4) Add the datasources

    5) Publish app

    6) You can now use these datasources in the commandbar for your model-driven app

     

  • CU25012207-0 Profile Picture
    17 on at
    I've added the Data table by opening the Component Library and it's now available in my model driven app.
     
    How did you get the currently selected value from this list?
     
    If I use First() or Last(), it works!
     
    'Service Type': First('Service Types')
    'Service Type': Last('Service Types')
     
     
    But I need to clone the value from the selected record.
     
    I've tried it these 2 ways. Both did  not work
     
    1) Lookup
     
    'Service Type': LookUp('Service Types','Service Type (cts_servicetype)' = Self.Selected.Item.'Service Type')
     
    2) Search
     
    'Service Type': Search('Service Types',Self.Selected.Item.'Service Type','Service Type (cts_servicetype)')
     
    I believe I'm very close! :)
     
    Sanjeev
     
     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard