Develop > Tailoring > Form creation > Dynamic View Dependencies > Use form dep.g to demonstrate Dynamic View Dependencies

Use form dep.g to demonstrate Dynamic View Dependencies

The form dep.g has been prepared to demonstrate Dynamic View Dependencies. You can interact with this form to see the DVD examples this form uses and the dynamic effects they create.

To understand DVD examples on the dep.g form:

  1. Click Tailoring > Forms Designer.
  2. Type dep.g in the Form field, and click Search.

    The dep.g form opens.

  3. Select the Instructions tab for instructions on how to use three types of DVD conditional statements. For more information, see Dynamic View Dependencies.
  4. Follow the instructions and interact with the different fields to observe how the View properties change dynamically.
  5. Click Design.
  6. Inspect Properties View to see what values are assigned to create the effects. The following tables explain those properties that create the dynamic effects on different tabs of the form.

    Labels and Fields tab:

    Control Name Property: Value Explanation

    Providers > Caption text box

    (Text22)

    • Visible: 1
    • Input: $caption
    • This text box is always visible.
    • The value you type in this text box (disabled, big, bold, or italic) is assigned to the $caption variable, which is referenced in other conditional statements on the same screen.

    Providers > Severity text box

    (Text25)

    • Visible: 1
    • Input: $severity
    • This text box is always visible.
    • The value you type in this text box (sev1, sev2, sev3, or any other value) is assigned to the $severity variable, which is referenced in other conditional statements on the same screen.

    Providers > Disabled check box

    (CheckBox28)

    • Visible: 1
    • Input: $disabled
    • This check box is always visible.
    • When you select or clear this check box, 1 or 0 is assigned to the $disabled variable, which is referenced in other conditional statements on the same screen.

    Providers > Invisible check box

    (CheckBox30)

    • Visible: 1
    • Input: $invisible
    • This check box is always visible.
    • When you select or clear this check box, 1 or 0 is assigned to the $invisible variable, which is referenced in other conditional statements on the same screen.

    Dependents > Caption label

    (Label33)

    • Visible Condition: [$invisible] = 0
    • Caption Condition: [$caption]
    • Foreground Color Condition: [$severity]
    • This label is visible only when the Providers > Disabled check box (CheckBox28) is not selected.
    • The value you type in the Providers > Caption text box (Text22) is automatically populated as the caption of this label.
    • The font color of the label caption changes with a color ID number (1, 2, 3 and so on) you type in the Providers > Severity text box.

    Dependents > Expression label

    (Label35)

    • Visible Condition: [$invisible] = 0
    • Foreground Color Condition: [$severity] ? "sev1","sev2","sev3" : 1, 7, 2, 13
    • Bold Condition: [$caption]="bold"
    • Italic Condition: [$caption]="italic"
    • Font Increase Condition: [$caption] ? "big" : 5, 0
    • This label is visible only when the Providers > Disabled check box (CheckBox28) is not selected.
    • The font color of the label caption changes with the value you type in the Providers > Severity text box (Text25): color 1 for sev1, color 7 for sev2, color 2 for sev3, and color 13 for any other entries.
    • The label caption is bolded if you type bold in the Providers > Caption text box (Text22).
    • The label caption is in italic if you type italic in the Providers > Caption text box (Text22).
    • The font size of the label caption is increased by 5 only when you type big in the Providers > Caption text box (Text22).

    Dependents > Disable Checkbox text box

    (Text37)

    • Visible Condition: [$invisible] = 0
    • Read-Only Condition: [$disabled]
    • Input: $x
    • This text box is visible only when the Providers > Disabled check box (CheckBox28) is not selected.
    • This text box is read-only when the Providers > Disabled check box (CheckBox28) is selected.
    • The value you type in this text box is assigned to the $x variable, which is also the Input of the Disable Caption text box (see below).

    Dependents > Disable Caption text box

    (Text39)

    • Visible Condition: [$invisible] <> 1
    • Input: $x
    • Read-Only Condition: [$caption] = "disabled"
    • This text box is visible only when the Providers > Disabled check box (CheckBox28) is not selected.
    • The input of this text box is $x, which is same as the value in the Dependents > Disable Checkbox text box (Text37).
    • This text box becomes read-only when you type disabled in the Providers > Caption text box (Text22).

    Dependents > Visible label

    (Label41)

    • Visible: 1
    • Caption Condition: [$invisible] ? 0, 1 : "Yes" ,"No"
    • This label is always visible.
    • The caption of this label is Yes when the Providers > Disabled check box (CheckBox28) is not selected, and No when the check box is selected.

    Select Function tab:

    Control Name Property: Value Explanation

    Categories combo box

    (ComboBox51)

    • Input: $category
    • Value List Condition: select( "name", "category", "category", *)
    • The value you select in this combo box is assigned to the $category variable, which is referenced in the Value List Condition property of the Subcategories combo box.
    • This select function returns all category names from the category table (that is, the category field can be any value (*)).

    Subcategories combo box

    (ComboBox53)

    • Input: $x
    • Value List Condition: select( "subcategory", "subcategory", "category", [$category] )
    • The value you select in this combo box is assigned to the $x variable (which is not referenced in any other conditional statements on the same screen though).
    • This select function returns, from the subcategory table, the subcategories of a category you specify in the Category combo box ($category).

    Operator combo box

    (ComboBox57)

    • Input: $operator
    • Value List Condition: select( "name", "operator", "name", *)
    • The value you select in this combo box is assigned to the $operator variable.
    • This select function returns the login names of all records in the operator table (that is, the login name can be any value (*)).

    Capabilities text area

    (MultiText59)

    • Caption Condition: select( "cap.exec", "operator", "name", [$operator] )
    This select function returns the capability words (the cap.exec field in the operator table) of the operator that you select in the Operator combo box into the Capabilities text area.

    Buttons tab:

    Control Name Property: Value Explanation

    Ok radio button

    (Radio70 )

    • Input: $buttonID
    • Value: Ok
    • The input value of this radio button is assigned to the $buttonID variable.
    • When selected, this radio button has an input value of Ok.

    Cancel radio button

    (Radio72)

    • Input: $buttonID
    • Value: Cancel
    • The input value of this radio button is assigned to the $buttonID variable.
    • When selected, this radio button has an input value of Cancel.

    Design radio button

    (Radio73)

    • Input: $buttonID
    • Value: Design
    • The input value of this radio button is assigned to the $buttonID variable.
    • When selected, this radio button has an input value of Design.

    None radio button

    (Radio74)

    • Input: $buttonID
    • Value: None
    • The input value of this radio button is assigned to the $buttonID variable.
    • When selected, this radio button has an input value of None.

    Button

    (Button71)

    • Caption Condition: [$buttonID]
    • Button ID Condition: [$buttonID] ? "Ok", "Cancel", "Delete", "Design" : 3, 5, 4, 9, 50
    • The caption of this button dynamically changes to the value of the $buttonID variable (Ok, Cancel, Design, or None).
    • The ID of this button changes dynamically with the $buttonID variable value as follows:
      • 3 when the $buttonID value is Ok;
      • 5 when the $buttonID value is Cancel;
      • 4 when the $buttonID value is Delete;
      • 9 when the $buttonID value is Design;
      • 50 when the $buttonID value is none of the above-listed values

      When you press the button, it functions as the Ok, Cancel, or Design button accordingly.

    Bitmaps tab:

    Control Name Property: Value Explanation

    Provider > Ticket Severity combo box

    (ComboBox79)

    • Input: $ticketSeverity
    • Value List: ok;warning;alert
    • Display List: Low;Medium;High
    • The value you select in this combo box is assigned to the $ticketSeverity variable.
    • The available selections are: ok, warning, and alert.
    • The available selections are displayed as: Low, Medium, and High.

    Dependents > chart

    (Chart81)

    • Caption Condition: [$ticketSeverity] ? "ok", "warning", "alert" : "1","5","10","0"

    • Color List=green;yellow;red

    • Color Scale=1;5;10

    Note: The Properties pane of this chart does not currently display the complete property information. You can open the dep.g form in non-Design mode and click Format Detail from the More Actions menu to view the complete property information of this chart.

    • A value displays in the column of the chart as follows:

      • 1 when $ticketSeverity is "ok" (that is, when you select Low in the Ticket Severity combo box);
      • 5 when $ticketSeverity is "warning" (that is, when you select Medium in the Ticket Severity combo box);
      • 10 when $ticketSeverity is "alert" (that is, when you select High in the Ticket Severity combo box);
      • 0 when $ticketSeverity is none of the above-listed values (that is, when the Ticket Severity combo box is empty).
    • A list of colors is applied to the chart column: green, yellow, and red.

    • The color of the chart column is determined as follows:

      • Green when the column value is 1;
      • Yellow when the column value is 5;
      • Red when the column value is 10.

    Dependents > image

    (Graph82)

    • Image Condition: [$ticketSeverity]
    This image dynamically changes with the option you select in the Ticket Severity combo box: Low (ok.gif), Medium (warning.gif), or High (alert.gif).

    Dependents > marquee

    (Marquee83)

    • Caption Condition: [$ticketSeverity] ? "ok","warning","alert" : "Severity is low ...","Severity is medium ...","Severity is HIGH!!"

    The caption of this marquee dynamically changes with the option you select in the Ticket Severity combo box:

    • Severity is low ... when you select Low (ok);
    • Severity is medium ...when you select Medium (warning);
    • Severity is HIGH!! when you select High (alert).

    Circular Dependencies tab

    Control Name Property: Value Explanation

    Hello check box

    (CheckBox88)

    • Input: $hello
    • Selected Condition: [$world]
    • The input value of this check box (0 or 1) is assigned to the $hello variable.
    • This check box is selected or deselected when the value of the $world variable is 1 or 0 (that is, when the World check box is selected or deselected).

    World check box

    (CheckBox89)

    • Input: $world
    • Selected Condition: [$hello]
    • The input value of this check box (0 or 1) is assigned to the $world variable.
    • This check box is selected or deselected when the value of the $hello variable is 1 or 0 (that is, when the Hello check box is selected or deselected).

    I am my number one fan! check box

    (CheckBox91)

    • Input: $self
    • Selected Condition: [$self]
    • The input value of this check box (0 or 1) is assigned to the $self variable.
    • This check box is selected or deselected when the value of the $self variable is 1 or 0 (that is, select or deselect of this check box is independent of any other controls).

Note: The fields in dep.g use variables because dep.g is not associated to a dbdict. You can use field names on forms that do have an associated dbdict.

Related concepts

Dynamic View Dependencies
Field comparisons
Field value matching
Dynamic functions

Related tasks

Use field comparisons
Use dynamic functions
Use field value matching