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 / Use the Lookup functio...
Power Apps
Answered

Use the Lookup function in powerapps

(0) ShareShare
ReportReport
Posted on by 122

I use this Lookup function to display the quantity in the Sharepoint List CurrentProductsStock if there is an ID equal to the ID of the sharepoint list Product. But I'm still faulty.

Edward00_0-1689661702864.png

Product List:

Edward00_1-1689661839227.png

CurrentProductStock List: 

Edward00_2-1689661897348.png

Column Product in CurrentProductStock List use type Lookup:

Edward00_3-1689662041776.png

Please help me. Thank you very much.

 

 

 

 

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @Edward00 

    Try this

    Lookup(CurrentProductsStock, Product.Value = varAddCart.ID, Quantity)

     

  • Edward00 Profile Picture
    122 on at

    Edward00_0-1689673562990.png

    it's still faulty.

  • EddieE Profile Picture
    4,641 Moderator on at

    @Edward00 

    A few things

     

    1. What is varAddCart? I assumed this is a variable which contains a full record?

    2. Can you hover of the .Value part where the Red line is heavier and capture the error text

    3. Also, do the same as 2 for 'Quantity'

    4. Can you double check the name of the 'Product' column; use

        List settings --> Click the column --> the actual column name is the last part of the URL, eg

     

    EddieE_1-1689723432329.png

     

     

    Also - just for reference - the 'Id' which you where trying to reference in your first formula is simply an internal ID used by the LookUp column and not related to the ID coming from the associated list.

  • Edward00 Profile Picture
    122 on at

    I'm guilty like this. So where am I wrong, sir. And varAddCart is what I assign to the gallery item when OnSelect.

    1.

    Edward00_2-1689737852307.png

    2.

    Edward00_0-1689737777702.png

    3.

    pwa_1.png

     

    4.

    Edward00_1-1689737828700.png

     

     

  • EddieE Profile Picture
    4,641 Moderator on at

    @Edward00 

    I didn't spot that before - but the error is telling you what is wrong, ie Lookup should be LookUp. This is my bad from the code above - sorry.

     

    Try this, then see if you are still getting errors

    LookUp(CurrentProductsStock, Product.Value = varAddCart.ID, Quantity)

     

  • Edward00 Profile Picture
    122 on at

    It's faulty like this and it's faulty where the equal sign,sir.

    pw2.png

  • gvls Profile Picture
    2 on at

    I assume that its varAddCart  your selected Product.

     

    Lookup(CurrentProductsStock, Product= varAddCart.ID, Quantity)

     

     

    your lookup should be Comparing the columns of Identity Column key and foreign key column.

     Let me know if still face issues.

     

     

     

     


     

  • Verified answer
    EddieE Profile Picture
    4,641 Moderator on at

    @Edward00 

    Change

    Gallery9.Selected.ID

    to

    Text(Gallery9.Selected.ID)

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