Have you ever wished that you had different forms, not only for different kinds of users but for different situations? For example, if an issue's status is "closed" you'd like to require users to fill out the Resolution field. But in any other situation, they don't need to complete this field. In fact, until an issue's closed, users don't even need to see this field.
QuickBase's Dynamic Form Rules lets your application roll with the punches. Your forms can behave differently based on specific conditions. You set the condition and tell QuickBase what action (or actions) to perform. For example:
When package type is "fragile" display the Special Handling Instructions field.
When the user is in the role of Manager, display the Performance Review History section.
When status is "on hold" display and require the Reason for Delay field
When status changes to "completed" enter today's date in the Date Completed field.
Note: Rules run in a user's browser, not on the Web server. This means that the values a rule generates, aren't saved until the user clicks the Save button. Because QuickBase fills out these values, it may look like they're already in your QuickBase application. However, these values behave like those that a user manually enters: they're not in the system until the user saves the form. (See what a form looks like.) Also, rules work within data-entry FORMS only, not in grid-edit.
To add a dynamic form rule:
First, Create or open the form to which you want to add a rule and click the Rules tab. Then follow the steps below:
Step 1: Setting a condition
QuickBase needs to know the conditions under which the rule applies. In other words, when should the program trigger the action you're about specify? To set a condition:
Select a form element.
The first step in setting a condition is to choose the element you
want to base it on. For example, say your condition is: When the Status
field is "completed." In this case, the Status
field is the element upon which you're basing the action. Within the
When section, click the Select a field...
dropdown on the left and select one of the following elements:
A field within the table. Most of this dropdown list consists of fields in the table.
The record. Sometimes you'd like to base an action on the record itself. For example, when a viewer opens the record, QuickBase could display a message.
The user. This selection lets you set an action based on the user. For example, when the user is in the role "Manager" show the Supervisor section.
Multiple Conditions. Select this option if you want to set a rule where any of a number of conditions might be met to generate an action. When you do so, QuickBase displays extra rows of dropdowns. (To read how to fill them out, skip to Step 2: Setting multiple or additional conditions.)
Select an operator for the condition.
After you select an element, click the dropdown in the second column
to select an operator. Your choices here depend upon what you selected
as your element and may include choices like "is," "is
not," ">" (greater than), and so on. (If you've
chosen an element like the record, this dropdown
may not require Step C, setting criteria. In that case, QuickBase
won't display a third column and you can move on to Step 2:
Setting Additional Conditions or Step 3: Specifying
Actions.)
Set Criteria.
Click the third column's
dropdown
arrow to make a selection or type in the criteria. Choices here depend
upon the selections you've already made. For example, if you selected
a user field in Step A, a list of application users appears. If you
selected a text field, you can type in a value.
Possible combinations resulting from Steps A through C include the following conditions:
when a field is a particular value
when a field is not a particular value
When a field is greater than a particular value
When a field is less than a particular value
when a user field's value equals the current user (in other words, a field like "assigned to" field contains the name of the person filling out the form)
when the user (filling out the form) is in a particular role
when the user is not in a particular role
when the record in the form opens
when the record is saved
when the record is saved (after checking). Use this option if your form contains required fields that a user must complete (as opposed to those that a form rule will complete). This condition gives QuickBase a chance to check and make sure those fields contain values before performing the action that you'll link to this condition. For example, say you want to timestamp a record when the form is saved. A user clicks the Save button, but since she didn't complete a required field, QuickBase aborts the save. If the form rule condition does not include the"after checking" option, the timestamp reflects the first save attempt. Then once the user makes the required entries and saves again, the action timestamps the second save attempt as well. But if you select the when the record is saved (after checking) option, QuickBase only recognizes the final save as the trigger for your action.
TIP: If you select when the record is saved, you can go on to set additional conditions around data the form contains. If you want to do so, read about setting multiple conditions in the next section. You may also need to refer back to the lettered steps above for each individual condition. Options include the usual Operators, like "is" or "is not" (see Step b), but if you select a field as your element, you can also select "has changed," "haschanged to" or "has changed from."
If you selected Multiple Conditions during Step 1, QuickBase displays extra controls which let you set several conditions at once. First, click the dropdown to the right of the Multiple Conditions field. Here you can specify when you want to apply the rule: When the conditions you're about to set are true or are false. Do they ALL need to comply with your choice here? Well, you tell QuickBase. In the dropdown on the next line, specify whether or not any or all conditions need to be met. Finally, on the next line, make selections in the three dropdowns to set a condition. (Don't know what to choose? You can follow the instructions in Step 1, earlier this topic) To apply additional conditions, click the Add Condition button on the upper right of the rule designer pane.
If you didn't select Multiple Conditions, you can still set multiple conditions by clicking the Add Condition button on the upper right of the rule designer pane. When you do so, QuickBase lets you specify conditions that also must be met—in addition to the first condition. Options here are similar to the controls discussed in Step 1. The program lets you specify whether any or all of the additional conditions should be met. For each condition you want to add, click the Add Condition button.
Plan
to set multiple conditions to act on a single element? Read
the note at the end of this topic.
Tip: To get rid of a condition you've entered, click the leftmost dropdown that comprises it and select <remove this condition> from the list.
Within the Action section, tell QuickBase what you want the program do when data in the form meets your condition(s). Your options here depend upon the selections you've already made. From the first dropdown, select an action, like "show" or "require" and from the second dropdown, select the form element the action affects. With this combination you can set up the following actions:
change a field to a particular value
change a field to the value in another field
change a user field to a particular user or to the 'current user'
hide a field or section
show a field or section (Note: In order to show a field, you must add it as an element on the form. If you don't, QuickBase can't show it there, and your rule won't work.)
make a field required
make a field not required
make a field read-only
make a field editable
display a message
You don't have to stop at one action. Have your condition trigger a flurry of activities. To add an action, click the Add Action button on the upper right of the rule designer pane.
Note: Do not use a rule to "hide" or "show" a required field. Users who do not trigger display of the field won't be able to save the form. If you want to require a field that displays only under certain conditions, add the "require" action to the rule that displays it (instead of within the field's properties).
Rules run in the order that they appear listed on the Rules
tab. To change the order, select the rule you want to move, by clicking
its
icon. Then click the Move Up or Move Down
button to change its position in the list. Because rules run in a specific
order, the entire group runs multiple times. After all, a rule that occurs
late in the list may generate a value that satisfies a condition that
appears earlier in the list.
A note on setting multiple conditions:
When two or more form rules show or hide the same element, you should combine them into one rule, using the Multiple Conditions selection.
Why? When multiple rules show or hide the same element, later rules interfere with those that fire earlier. In order to work correctly, each form rule has an inverse statement that tells QuickBase what to do when a rule's conditions aren't met. When you create or select a rule, you can see this inverse in the Otherwise section just below Actions. For example, if you were to create a rule that specifies:
When Package Type is Fragile, show the Special Handling section
you'd see that part of that rule is also:
When Package Type is not Fragile, hide the Special Handling section
That's fine until a second rule comes along. (Rules run in the order in which they appear on the Form Builder.) Say that a later rule reads:
When Package Type is Oversize, show the Special Handling section.
The "otherwise" portion of this rule specifies that:
When Package Type is not Oversize, hide the Special Handling section
So, if Package Type is Fragile when the second rule runs, QuickBase would hide the Special Handling section, even though that contradicts the first rule. The later rule has the last word and "word" is that Fragile is not Oversize.
What you'd really like to say is: When Package Type is Fragile or Package Type is Oversize, show the Special Handling section. To do so, create one rule which includes multiple conditions, specifying that any can be true.
Related Topics
© 1999-2010 Intuit Inc. All rights reserved.