Developer here, no UX expert. I have a somewhat unfortunate requirement in a Web-GUI: There are data concerning employees, including an active/inactive flag and a leaving date. If a leaving date exists and it is in the past, the employee is automatically set to inactive (by a daily batch process).

The question is how to handle this dependency in the GUI. Of course I can go throught the hoops and loops, activating and deactivatin the "active" switch according to the leaving date, but I'd rather hope to find a better solution, which makes immediately clear that you can only switch the state of the employee (e.g. in case of maternity leave, long-term sickness etc) if she didn't left the company (because else she is "automatically" inactive).

I can't change the data model (without very good reasons) and the available widgets are somewhat limited, but except that I have some freedom concerning this problem.

2 Answers 2


Basically it means that you have 3 different employee statuses:

  • active [toggleable]
  • temporarily inactive [toggleable]
  • permanently inactive

Unless I am not getting your situation correctly, the solutions are rather simple and more than one:

  1. Add toggling functionality (show toggle button) only for first two user statuses.

  2. List current employees and past employees separately. Like two different choices on the menu.

Also you should convey the status of each employee visually. For example:

  • active: black text, white background
  • temporarily inactive: black text, gray background
  • permanently inactive: darkgray text, gray background

(colors are suggestions and should be adjusted to your UI color scheme, but the principle should remain - that there are gradations in contrast)

  • "permanently inactive" is not quite correct, as the leaving date may change (because of input error, re-employment), and then the employee must be "toggable" again.
    – Landei
    Commented Apr 2, 2014 at 14:44

The answer is quite simple. All you have to do is make your Active column a computed column in your database where it's value is based on whether or not your Leaving Date IS NULL.

In T-SQL, the formula would look like this:


Then in your GUI, simply make the Active Status a label.

  • No, when there is no leaving date or when it isn't reached yet, the employee can be set to active or inactive. Only after the leaving date the active flag is fixed to "inactive".
    – Landei
    Commented Apr 2, 2014 at 14:47
  • @Landei - I based my answer on the part of your question where you said, "activating and deactivatin the 'active' switch according to the leaving date." If that isn't true, it would really help if you could update your question to be a little clearer on what exactly you are looking for. Commented Apr 2, 2014 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.