Use color to indicate status in a repeating section InfoPath 2007

Author: mety Labels::



how to use conditional formatting to change the background color of a row in a repeating section (repeating section: A control on a form that contains other controls and that repeats as needed. Users can insert multiple sections when filling out the form.). This is useful if you want to show the status of an item in the repeating section. For example, in a status report form template, you can use conditional formatting to make the row for an item that is behind schedule red, and the row for an item that is on schedule green.
Note This article uses color to demonstrate a procedure. However, some users cannot discern colors. To create an accessible form template, be sure to also add meaningful text to your form template to indicate the status of an item

Step 1: Add your controls

In order to complete this procedure, your form template must contain a repeating section, a text box, and a drop-down list box. To add these controls, do the following:
  1. On the form template, click where you want to insert a repeating section.
  2. If the Controls task pane is not visible, click More Controls on the Insert menu, or press ALT+I, C.
  3. In the Controls task pane, select the Automatically create data source check box.
  4. Under Insert controls, click Repeating Section.
  5. Place the insertion point in the repeating section.
  6. Under Insert controls in the Controls task pane, click Text Box.
  7. Press ENTER, and then under Insert controls, click Drop-Down List Box.
  8. In the form template, type Work Item: as the label for the text box, and type Status: as the label for the drop-down list box.
  9. Double-click the drop-down list box on the form template.
  10. Click the Data tab.
  11. Under List box entries, click Add.
  12. In the Value box in the Add Choice dialog box, type Active, and then click OK.
  13. Repeat steps 11 and 12 to add Resolved and Closed as choices in the drop-down list box.

Step 2: Specify the conditional formatting

After you add your controls to the form template, you can specify the appropriate conditional formatting.
  1. Select the repeating section in the form template, and then on the Format menu, click Conditional Formatting.
  2. In the Conditional Formatting dialog box, click Add.
  3. Under If this condition is true, in the first box, click the field that corresponds to the drop-down list box that you just inserted.
  4. In the second box, leave the value as is equal to.
  5. In the third box, click Type text, and then type Active. Note The expressions are case sensitive.
  6. In the Shading list under Then apply this formatting, click red, and then click OK.
  7. Repeat steps 2 through 6 to add conditional formatting for the two remaining list entries. Select yellow as the background color for Resolved and green as the background color for Closed.

Step 3: Preview the form template

After you add conditional formatting to the form template, it is recommended that you test the changes to make sure that they are working properly.
  1. To test your changes, click Preview on the Standard toolbar, or press CTRL+SHIFT+B.
  2. In the preview window, select the different options in the drop-down list. Notice that as you select the options, the background color in the section changes accordingly.
  3. On the Insert menu, point to Section, and then click the section name to add an additional section. Notice that the conditional formatting is applied independently to both sections.

0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2