To use this page you have to define each field as in examples below:
1. 'FieldName' will be your column name in item.aspx page gridview, to define, you have to write a simple name in alphabet,
but it cannot be the same as the column name that you'll choose.
2. 'Formula' will be the column from Item/ItemUOM/ItemBatch table that you desire to get and show in item.aspx page gridview,
to define, you will have to insert the name of the column you chose.
3. Few examples will be shown as below:
(a)FieldName : Stock
Formula : Item.StockControl
(b)FieldName : Promoter
Formula : Item.HasPromoter
(c)FieldName : FinalUpdate
Formula : ItemUOM.LastUpdate
4. You can copy and paste from the examples to test.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Below example show you how to add colour to gridview when the purchase date is over 1 year, 2 years and 3 years.
Chose the only available colour coding for your gridview.
Create a purchase date column as text field in the user define field column.
Create a new column with name gvColour to put in the formula.
Modify from below formula to make the gridview with colour.
SELECT IIF(DATEDIFF(day,PurchaseDate,getdate())>730, 'Aqua', IIF(DATEDIFF(day,PurchaseDate,getdate())>365, 'AliceBlue','White'))
Additional example:
1. Select CASE WHEN ItemUOM.BalQty>0 THEN 'RED' ELSE 'BLUE' END
2. Create a column name as ReOrder, add in the SQL statement to the formula column Select CASE WHEN Cast(ItemUOM.BalQty as int)>Cast(Item.ReOrderQty as int) THEN 'RED' END. Refer picture as below
3.
In order to show PopUp message in Home Page, Add the Expected Result of Formula in to Column Expected Result.
example: