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 / Stuck with LookUp() - ...
Power Apps
Answered

Stuck with LookUp() - Cannot Reference a Dataverse lookup column?

(0) ShareShare
ReportReport
Posted on by 75

Hello all,

 

I am running into a metaphorical brick wall regarding the LookUp() function with reference to lookup columns in Dataverse. There are two tables, 'tools' and 'actions', and I want to pick out the last action for that specific tool. A One-to-Many relationship has already been set up between 'tools' and 'actions'...

 

tools 
tool_idPrimary ID (Auto #)
rankingChoice
textText

 

actions 
action_idPrimary ID (Auto #)
toolLookup (tool_id)
statusChoice
 
Here's a snippet of the code I'm currently working with... Power Apps indicates that "LookUp has invalid arguments", but this is the format I've taken out of the documentation and have used with success in previous applications.
ClearCollect(data,
    AddColumns(
        // Get 'tools' table
        tools,
 
        // Identify last status from 'action'
        "status",
            LookUp(Sort(actions, createdon, Descending), cr979_toolsid = tool, status)
    )
);

Any ideas/suggestions would be greatly appreciated! If there's an alternative to LookUp() I'd also be very happy to hear them!

Categories:
I have the same question (0)
  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at
    ClearCollect(data,
     AddColumns(
     // Get 'tools' table
     tools,
     
     // Identify last status from 'action'
     "status",
     LookUp(Sort(actions, createdon, Descending), cr979_toolsid = tool). status
     )
    );

    I am not sure why was "tool, status" used, were you trying to return status, if yes use the following code

  • djworsdell Profile Picture
    75 on at

    @Manan-Malhotra wrote:

    I am not sure why was "tool, status" used, were you trying to return status, if yes use the following code


    Thanks Manan - now I've encountered an "AddColumns has some invalid arguments", and underlines the entire section red. Completly at a loss as I haven't seen this behaviour before...

  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at

    Then I am guessing the code written by you is correct just change the new column name from "status" to "someother name"

    Also can you share the Screenshot of the error if it still exists 

  • Verified answer
    Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at

    Hey, Actually your lookup isn't reading the table name "action"
    Try using "[@action]" this way

     

    Please Accept as Solution if it solves your question Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/manan-malhotra-vfx/

    Want to support me! Buy me a Cup of Coffee?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard