Field Logic (advanced mode)
You might want to change the appearance of your button matrix based on whether or not certain criteria are met. The idea is that the selection of fields and/or buttons which are visible (and/or available to be selected), can be contingent on the value of fields elsewhere in the convention. Field logic can only be added or edited when the editing suite is in advanced mode. The panel to add or edit field logic is located below the ‘fields’ panel in the editing suite.
Clicking the ‘Add Rule’ button allows me to integrate a piece of logic.
Logical behaviours are comprised of two parts: an ‘if’ statement and a ‘then’ statement. I can edit the ‘if’ statement to specify under what conditions an action can be taken. The ‘if’ statement will be something which resolves to a boolean, about the status of the fields. For instance, an ‘if’ statement might read: ‘if the source is twitter’, meaning that action should be taken when the ‘twitter’ button in the ‘source’ field is clicked.
In addition to an ‘if’ statement, a ‘then’ statement is required. A ‘then’ statement specifies what action to be taken when the ‘if’ statement is true.
There are four kinds of actions which can be taken: disabling buttons, enabling buttons, hiding fields and showing fields.
This process allows dynamic, logical behaviours in the button matrix. For example, we might consider a situation in which I have two teams using my convention: My CRM team and my social media team. My CRM team exclusively use, let’s say, Email and Newsletter as the source of clicks, while the social team exclusively use Instagram and Facebook as their source of clicks. I don’t want a member of my CRM team clicking a source associated with my social team, or vice-versa. I will use field logic to prevent this from happening. At the top of my convention, I will have a field for specifying my team, with two buttons: CRM and Social. (This field may be associated with its own datapoint, if I wish, but that does not have to be the case).
I will create a logical statement, which will disable the buttons ‘Instagram’ and ‘Facebook’ from the ‘source’ field when the ‘Team’ field’s value is ‘CRM’. Conversely, I will create a second logical step to accompany my first: I will disable the buttons ‘Newsletter’ and ‘Email’ when my team is set to ‘Social’.
With these logics your Chrome Extension now just enables the buttons you picked for each team, the others can’t be clicked.