Jump to content
Server Maintenance This Week. ×

Calculation for button label


This topic is 987 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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))
)

 

Link to comment
Share on other sites

This topic is 987 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.