Can you specify your problem in a more clear way? I did not understand what you want to do.
Thanks and Regards,
First I would like to find out the error codes (HH UEC & LH UEC) if any for each record based on the criteria set for paraA, B, C & D (on the right, which is dynamic)
Secondly, I want to list/summarize the UEC by SN & Loc. However, I do not want to display all UECs but only 1 per SN & Loc. The UEC will be selected using this Importancy Hierarchy: UEC 4 > UEC 5 > UEC6 > UEC 7 > UEC A > UEC 8 > UEC B > UEC 9 (Eg: if both UEC6 & UEC7 occurred for same SN & Loc, then UEC6 shall be displayed)
Hope my explanation is clear for you.
The order of evaluation for [LH UEC] looks incorrect. Give this a try:
IF [ParaB (s)]>[ParaB_High] and [ParaA (s)]>[ParaA_Low] then 'UEC 0' elseif [ParaB (s)]>[ParaB_High] then 'UEC 6' elseif [ParaB (s)]>[ParaB_Low] then 'UEC 7' elseif [ParaA (s)]>[ParaA_High] then 'UEC 4' elseif [ParaA (s)]>[ParaA_Low] then 'UEC 5' else 'Good' END
Thanks for your suggestion. Will try out.
By the way, is there any specific reason to go by this order ?