More logic in control logic

EmailFacebookGoogle+LinkedInTwitterShare

The control logic in Enterprise’s datacards can only include logic based on file’s variables. Weak. Life is more than just variables isn’t it?

The admin training manual shows a nice little trick of how you can control what people see on a datacard using tabs. You can control which tab is visible depending on a few factors…but even that is limited and tragically you can only show one tab at a time.

So here was my recent real world problem. Imagine having a card containing several edit boxes. Each edit box can only be modified by a certain corresponding user group….if a user is a member of more than one group, he needs access to the proper set of controls -users could be members of any combination of groups.

!!!!

Here was my solution:

  1. On the card, I created a checkbox for each group
  2. I set the control logic on these checkboxes so they would always be invisible. [Something like if the description contains the letter “A” or does not contain the letter “A” turn off the visibility. Even though they are invisible, you do want these to look rather neat because they can still be seen if being used as a search card.]
  3. I set the control logic on the edit boxes I ultimately wanted to manage to look at the proper corresponding checkbox created in step 1.  i.e if the checkbox was checked, enable; else disable.
    Control Logic Example(Click on thumbnail to enlarge)
  4. I wrote an Enterprise add-in that fires anytime a file is checked out. This addin ensures only the proper checkboxes are checked. (i.e. if he is member of the group, check the checkbox, else clear it.)

Setting the proper checkboxes automatically enables the proper edit boxes. That’s it. Four easy steps. You owe me a turkey sandwich pizza.

(There is no reason to bother clearing the checkboxes at checkin, they are always correctly set when a user again checks out the file, and when the file is checked in all controls are disabled anyway.)