All
Many of the forms I have created have contained a POST-QUERY trigger on the block which contains one or many of the following: -
IF :BLOCK.SALES_QTY = 0 THEN
SET_ITEM_INSTANCE_PROPERTY('BLOCK.SALES_QTY',CURRENT_RECORD, VISUAL_ATTRIBUTE,'VA_QTY_ZERO');
END IF;
Visually this helps the user as any zero values instantly stand out.
However, if my block contains items that use the Summary calculation mode, and I try and use the same POST-QUERY trigger for the Summary item, nothing happens.
Instead, I have to add the above "IF..THEN..SET Visual Attribute" to the WHEN-NEW-BLOCK-INSTANCE trigger after the EXECUTE_QUERY command has been issued.
I therefore have 2 questions.
1) Why does a POST-QUERY trigger not work for Calculated items in a Block?
2) If my IF..THEN commands are only doing something simple like setting a visual attribute based on the data, which is the recommended place to put these - in the WHEN-NEW-BLOCK-INSTANCE trigger (or anywhere that EXECUTE_QUERY is executed) OR in a POST_QUERY trigger?
Regards
Richard
Forms [64 Bit] Version 12.2.1.3.0 (Production)
Windows Server 2016 Strandard