Notifications
Announcements
No record found.
Hi I want to add a filter on the InventItemPrice form. I want to filter by ItemGroupId from the InventItemGroupItem Table.
What's the best way to do this?
Thanks in Advance.
*This post is locked for comments
Hi,
Could you provide some more details about your requirement as the form InventItemPrice form has two tabpage Active prices & Pending prices and do you want to display even the itemgroupId on the form. If so, you need to add the table InventItemGroupItem to the form with the joinSource as ItemPriceActivated and LinkType InnerJoin. In the init method of the datasource InventItemGroupItem add the following statement
Path: \Forms\InventItemPrice\Data Sources\InventItemGroupItem\Methods\init
public void init() { super(); this.query().dataSourceTable(tableNum(InventItemGroupItem)).addLink(fieldNum(InventItemPrice, ItemId), fieldNum(InventItemGroupItem, ItemId)); }
Add the field to the tabpage Overview under Active to see the value for ItemGroupId.
Path: \Forms\InventItemPrice\Designs\Design\[Tab:Tab]\[TabPage:Activated]\[Group:GroupActivated]\[Tab:TabActivated]\[TabPage:OverviewActivatedPrices]\[Grid:GridActive]
Hi Thank You...I just need it on ItemPriceSimulated and where do you put the filter for the item group?
Process I explained helps to create a itemGroupId fied on the grid(of Active prices tab page) such that you can filter it, if you want it on the Pending price tab(in overview tabpage grid) then use joinsource as ItemPriceSimulated and in the init method of table InventItemGroupItem your code would be like below. Let me know if anything is missing.
public void init() { super(); this.query().dataSourceTable(tableNum(InventItemGroupItem)).addLink(fieldNum(InventItemPriceSim, ItemId), fieldNum(InventItemGroupItem, ItemId)); }
Hi, one thing I don't understand. If we specify the relation to be 'inner join', then why do we need to use the 'addlink' function?
As there is no relationship between InventItemPriceSim and InventItemGroupItem, I used addLink method to explicitly mention the link, you can give a try without addLink method.
Now when I try to add a record, I get an error saying I need to add the Item Number.
Ok, I just needed to set the relation to 'Exists' and it works
Thanks!
strange...did not work...but thanks
If you change it to existsJoin, is it working or not?
Yes it works it I change it to an existsJoin...
...funny though how the link needs to specified twice: once through specifying the existsjoin and also using the addlink Method in code...but yeah it works...thanks again
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2