Announcements
No record found.
static void Demo_GetProductAttributes(Args _args) { inventTable InventTable; EcoResProductAttributeValue ecoResProductAttributeValue; EcoResAttribute ecoResAttribute; EcoResValue ecoResValue; while select InventTable where InventTable.itemid == "1604" join RecId from ecoResProductAttributeValue where ecoResProductAttributeValue.Product == InventTable.Product join Name from ecoResAttribute where ecoResProductAttributeValue.Attribute == ecoResAttribute.RecId join ecoResValue where ecoResValue.RecId == ecoResProductAttributeValue.Value { info(strFmt("%1 - %2 - %3", InventTable.ItemId, ecoResAttribute.Name, ecoResValue.value())); } }
ItemId = "1604"
1. Create a View
Creating a view that combines the relevant tables is a good approach. This way, you can easily join InventTable, EcoResProductAttributeValue, EcoResAttribute, and EcoResValue to fetch the attributes you need. This will allow you to display them alongside item numbers in the grid and provide filtering capabilities.
InventTable
EcoResProductAttributeValue
EcoResAttribute
EcoResValue
Create a View in AOT:
Define the Fields:
Implement Filtering:
Once you have your view created, you can modify the forms where you want to display these attributes:
Add the View as a Data Source:
Design the Layout:
Filtering Logic:
AllowEdit
AllowFiltering
Using a view is typically the best practice for this requirement, as it centralizes the logic for retrieving product attributes and allows for easy filtering. Make sure to test the performance of the view, especially if you're working with a large dataset, and implement any necessary indexing for optimal performance.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 528 Most Valuable Professional
André Arnaud de Cal... 424 Super User 2026 Season 2
CU10121822-0 374