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.
Product List:
CurrentProductStock List:
Column Product in CurrentProductStock List use type Lookup:
Please help me. Thank you very much.
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.
It's faulty like this and it's faulty where the equal sign,sir.
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)
I'm guilty like this. So where am I wrong, sir. And varAddCart is what I assign to the gallery item when OnSelect.
1.
2.
3.
4.
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
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.
it's still faulty.
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional