Create Form Rules

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:

How forms work:

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:

  1. 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:

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

  3. 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:

Step 2: Setting multiple or additional conditions

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.

Step 3: Specifying action(s)

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:

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:

you'd see that part of that rule is also:

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:

The "otherwise" portion of this rule specifies that:

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

 

Return to top

© 1999-2010 Intuit Inc. All rights reserved.