DataViews-Custom Columns feature is coming to an end, and Infor has yet to publish any KB of code samples for Expression Columns/Summaries.
Also, the online help is not comprehensive. As such, I would appreciate anyone to share practical examples here.
To kick-start, my humble share…
Example 1: To add an expression column on Items form (IDO = SLItems) to display inventory value (assuming Cost Method: Average, where Unit Cost reflects the true value)
InventoryValue = (DATAVIEWPROP(DerQtyOnHand) + DATAVIEWPROP(DerNonNettableStock)) * DATAVIEWPROP(DerUnitCost)
Example 2: To add an expression summary to display total inventory value at the bottom of the expression column InventoryValue in Example 1
TotalInventoryValue = SUMEXP(SLItems, DATAVIEWEXP(InventoryValue))
Example 3: To add an expression column on Purchase Order Listing form (IDO = SLPoItems) to display past due days
DATEDIFF('d', CURDATE(), DATAVIEWPROP(DueDate))
Example 4: To add an expression column on Purchase Order Receipts form (IDO = SLPoRcpts) to display quantity purchased in year 2024 only (with other years set to zero)
IF(DATEPART('yyyy', DATAVIEWPROP(RcvdDate))=2024, DATAVIEWPROP(DerQtyReceivedConv), 0)