August 13, 20214 yr Good day all, My apologize if I am posting in the wrong group. Can someone tell me why this calculation does no work. It always teturn the same value "Picking" I have a button bar with 6 segments, each element pertains to a department, i am trying to change the labels as each department enters data. It works is is not nested. Case ( not IsEmpty ( WTS v2.0::PickerDatePickingStart ); TextColor ("Picking"; RGB (255; 0; 0)) ; not IsEmpty ( WTS v2.0::PickerDatePickingEnd ); TextColor ("Picked"; RGB (255; 0; 0)) ) Thanks JMart
August 13, 20214 yr 4 hours ago, JMart said: why this calculation does no work. It always teturn the same value "Picking" I am guessing you are describing a situation where both the start and the end fields are filled, and you expect the button to show "Picked". The reason why it continues to show "Picking" is that the Case() function evaluates each test expression in order and returns the result specified for the first expression that evaluates as true. If you want the existence of a value in the end field to override the existence of a value in the start field, you need to reverse the order of the tests: Case ( not IsEmpty ( WTS v2.0::PickerDatePickingEnd ); TextColor ("Picked"; RGB (255; 0; 0)) ; not IsEmpty ( WTS v2.0::PickerDatePickingStart ); TextColor ("Picking"; RGB (255; 0; 0)) )
Create an account or sign in to comment