Table Items
========
UNIT ---- CM(1) , Inch(2)
PIECES
LENGTH
WIDTH
HEIGHT
CBM
VOL_MET_WEIGHT_INC
VOL_MET_WEIGHT_CM
Unit = CM
=======
Length * width * Height * Pieces / 6000 / 166.6667
11 * 24 * 11 * 500 / 6000 / 166.6667
=1.45 CBM
Unit = Inch
========
Length * width * Height * Pieces / 166 / 166.6667
22 * 20 * 18 * 100 / 166 / 166.6667
=28.62 CBM
--------------------------------------------------------------
Create Dynamic Actions
================
1. UNIT
Action : Set Value
Set type : SQL Statement
SQL Statement :
select case
when :UNIT = 1 then 6000
else 166
end VOL_MET_WEIGHT_INC,
166.6667 VOL_MET_WEIGHT_CM
from dual
Items to Submit : UNIT
Column(s) : VOL_MET_WEIGHT_INC,VOL_MET_WEIGHT_CM
2. PIECES & LENGTH & WIDTH & HEIGHT
Action : Set Value
Set type : PL/SQL Expression
PL/SQL Expression :
round((ROUND(NVL(:LENGTH,0)*NVL(:WIDTH,0)*NVL(:HEIGHT,0)*NVL(:PIECES,0))/NVL(:VOL_MET_WEIGHT_INC,0))/NVL(:VOL_MET_WEIGHT_CM,0),2)
Client-side Condition :
TYPE : Item/Column is not null
Component Type : Column
Column : UNIT
Items to Submit :
LENGTH,WIDTH,HEIGHT,PIECES,VOL_MET_WEIGHT_INC,VOL_MET_WEIGHT_CM
Affected Elements :
Column(s)/Items : CBM
-----------------------------------------------------------------------------------------------
যদি Add Row অথবা কোন value দেওয়ার সময় এই ধরনের Error আসে তাহলে Dynamic action এ Client-side-Condition দিন।