JMart Posted August 13, 2021 Posted August 13, 2021 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
comment Posted August 13, 2021 Posted August 13, 2021 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)) )
Recommended Posts
This topic is 1196 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now