Monday, April 1, 2019

Formula to display custom messages depending on quantity on hand

Create a search showing inventory on hand and display a text-based status based on the inventory quantity present. Inventory values of 0 could be displayed as "Out of Stock", anything under 10 could be "Low-Stock", values of 10-100 could be "Sufficient", while inventory levels above 100 would be displayed as "Overstock". This functionality is available via formula fields and the SQL "Case" function.

In this example, we will add the following formula under the Results tab of a Saved Inventory Numbers Search:

 

case
When {quantityonhand} = 0 Then 'Out of Stock'
When {quantityonhand} < 10 Then 'Low Stock'
When {quantityonhand} < 100 Then 'Sufficient'
When {quantityonhand} > 100 Then 'Overstock'
End

No comments:

Post a Comment