I have 2 CDS Entities.
1. Items
2. Sales Order Lines
The primary lookup field of Items is ItemID. For Sales Order Lines it is ProductNumber.
Example of ItemID = A001,A002,AP110
Example of ProductNumber = A001:: ::240.0,A001:: ::48.0, AP110:: :: 32.0
So for 1 value in ItemID there are multiple lines in Sales Order Lines (with primary ID ProductNumber).
I want to get data from Sales order lines using ItemID to search in product number.
Is it possible or am I asking too Much.
Also I created relationship between entities if it helps.
Thanks
Solved! Go to Solution.
Hi @Tushar18 ,
Sorry for my mistake.
It seems that that parameter does not support complex calls
We can use a variable to pass the ItemId you want.
UpdateContext({VarItemid:First(Items).ItemID)})
Then set the following to Gallery's Items
Filter('Sales Order Lines',StartsWith(ProductNumber, VarItemid) )
Best regards,
Sik
Hi @Tushar18 ,
Do you want to filter out all sales orders that the Product Number starts with ItemID?
You can use StartsWith function to get that, and use Filter funtion to get all data that satisfy that condition.
you can take the following formula for reference.
Filter('Sales Order Lines',StartsWith(ProductNumber, First(Items).ItemID) )
Best regards,
Sik
Thank you so much for replying.
There is an error stating the function First() has invalid arguements.
Also these are both cds entities.
As you can see I can get InventTransSumFo as a suggestion but if I select it, it throws error.
Hi @Tushar18 ,
Could you share the error information?
Maybe you missed StartsWith function from my last post.
Best regards,
Sik
Here's the whole formula and error message.
Hi @Tushar18 ,
Sorry for my mistake.
It seems that that parameter does not support complex calls
We can use a variable to pass the ItemId you want.
UpdateContext({VarItemid:First(Items).ItemID)})
Then set the following to Gallery's Items
Filter('Sales Order Lines',StartsWith(ProductNumber, VarItemid) )
Best regards,
Sik
Thanks a lot.
It might sound stupid but where should I put the formula UpdateContext({VarItemid:First(Items).ItemId}) ?
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
209 | |
194 | |
82 | |
58 | |
38 |
User | Count |
---|---|
303 | |
249 | |
120 | |
83 | |
55 |