Infopath das

668 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
668
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Infopath das

  1. 1. [Your company name] presents:Microsoft Office ®InfoPath 2003 Training ®Customizing form controls
  2. 2. Course contents• Overview: Techniques for customizing• Lesson 1: Add a button to your form for switching views• Lesson 2: Display dates and times in a form(Continued on next slide.) Customizing form controls
  3. 3. Course contents, cont’d.• Lesson 3: Hide or disable controls, conditional formatting• Lesson 4: Add up numbers in a tableEach lesson includes a list of suggested tasks and a set oftest questions. Customizing form controls
  4. 4. Overview: Techniques for customizing Controls are an essential part of any InfoPath form. Discover four great techniques for working with them effectively. For example, you can create a button that lets people switch easily between form views. You can also display dates and times the way you want using text boxes and date pickers. Customizing form controls
  5. 5. Course goals• Add a button that automatically switches between different views of the same form.• Display dates and times in a form.• Hide or disable a control.• Add up numbers in a table. Customizing form controls
  6. 6. Lesson 1Add a button to your form for switching views
  7. 7. Add a button for switching views In InfoPath, you can offer different ways to look at the data in your form by creating different views. You might create a special view thats optimized for printing. You might also create a high-levelAdding a button provideseasy switching between summary view to remove some ofviews. the detail in a complex form. Customizing form controls
  8. 8. A refresher on views A view is an alternative way to look at or present data in a form. InfoPath forms can have more than one view.Views offer differentperspectives of the datain a form. Customizing form controls
  9. 9. A refresher on views You might use views to: • Simplify a long, complex form by splitting it up into different views. • Show different versions of a form to different people based on their role in your organization.Views offer different • Create a print-friendly view of yourperspectives of the data form.in a form. Customizing form controls
  10. 10. A refresher on views You can freely copy the controls you need from your main view into other views in the form because all views share the same data source.Views offer differentperspectives of the datain a form. Customizing form controls
  11. 11. Views: The user experience If you design your form with multiple views, people filling out the form can switch from one view to another by clicking commands on the View menu.You can supply buttonsas another way to switchviews.. Customizing form controls
  12. 12. Views: The user experience To help form users who might miss the menu commands, add buttons to your form for switching views.You can supply buttonsas another way to switchviews. Customizing form controls
  13. 13. According to the rules Once you insert the button, how do you make it switch views when someone clicks it? The easiest way is to use a rule. Rules automate certain tasks in a form in response to events or actions initiated by the person fillingA rule makes the button out the form.switch views. Customizing form controls
  14. 14. According to the rules In this example, the picture at left shows that the form designer has created a rule that switches from the default form view, which contains a lot of detail, to a high- level summary view.A rule makes the buttonswitch views. Customizing form controls
  15. 15. According to the rules To create a rule for the button: Double-click the button to open the Button Properties dialog box. From within this dialog box, you can access the Rule dialog box, which is where you set up the rule for switching the view.A rule makes the buttonswitch views. Customizing form controls
  16. 16. According to the rules Use the Rule dialog box to associate rules with most controls in InfoPath, such as text boxes and check boxes. In this case, we want to associate a rule with a button so that the view changes when a button is clicked.A rule makes the buttonswitch views. Customizing form controls
  17. 17. Suggestions for practice1. Look at a form that has two views, and see InfoPaths default behavior for switching between them.2. Insert a button in each view.3. Create a rule that switches views.4. Test the user experience by clicking the buttons in a preview.Online practice (requires InfoPath 2003 Service Pack I) Customizing form controls
  18. 18. Test 1, question 1In InfoPath, a _____ is an alternative way topresent data in a form. (Pick one answer.)1. Subform.2. Transform.3. View.4. Preview. Customizing form controls
  19. 19. Test 1, question 1: AnswerView.When a user switches to a different view, the forms datadoesnt change; only the presentation of the form and theamount of data displayed change. Customizing form controls
  20. 20. Test 1, question 2How can people switch between views whenfilling out a form? (Pick one answer.)1. By clicking commands on a View menu or by clicking a custom button on the form.2. By clicking commands on a View menu or by selecting options in a Views task pane. Customizing form controls
  21. 21. Test 1, question 2: AnswerBy clicking commands on a View menu or by clicking acustom button on the form.If your form has multiple views, InfoPath automatically addsview-switching commands to the View menu for the user.You can also use a custom button and add a rule to it forswitching views. Customizing form controls
  22. 22. Test 1, question 3In InfoPath, rules are used to: (Pick one answer.)1. Prevent users from accessing restricted data in a form.2. Automate certain tasks in a form.3. Assign different roles to different types of users. Customizing form controls
  23. 23. Test 1, question 3: AnswerAutomate certain tasks in a form.As you learned in this lesson, you can use rules toautomatically switch views in response to a button click. Customizing form controls
  24. 24. Test 1, question 4Its okay to copy controls between views whenyoure designing a form. (Pick one answer.)1. True.2. False. Customizing form controls
  25. 25. Test 1, question 4: AnswerTrue. Customizing form controls
  26. 26. Lesson 2Display dates and times in a form
  27. 27. Display dates and times in a form Many forms contain dates. For example, you may have a form that shows the current date by default when people open it. Or, you may have one that includes a field where people can easily enter dates in a uniform way.There are many ways to InfoPath offers you different waysdisplay dates in a form. to display dates in a form and to collect dates from people. Customizing form controls
  28. 28. Display dates and times in a form In this lesson, you will: • Work with the today and now functions, which you, as the form designer, can use to show todays date and time in your form. • Work with the date picker, a control that lets users manuallyThere are many ways to enter dates.display dates in a form. • Learn how to better control the way dates display in your form. Customizing form controls
  29. 29. Pick a date, any date The date picker is a control that lets people quickly enter dates in a form by clicking in a small pop-up calendar. It looks a lot like a text box, with a small calendar icon on its right side.The date picker When people click this icon, a pop- up calendar appears in their form, allowing them to enter dates. Customizing form controls
  30. 30. Pick a date, any date The date picker can be customized: • Double-click the control and change its properties. • You can specify a default date or change the way the date looks in the form.The date picker Customizing form controls
  31. 31. Display todays date or time The date picker is a great way to let users enter dates of their choice, such as start and end dates for a particular project.The today and nowfunctions Customizing form controls
  32. 32. Display todays date or time But what if you want todays date to display automatically whenever people create a form? In this case, you can use a special function called the today function to add the current date to your form.The today and nowfunctions Customizing form controls
  33. 33. Display todays date or time The now function is similar to the today function. Users see the current time displayed in addition to todays date.The today and nowfunctions Customizing form controls
  34. 34. What if I don’t like how the date looks? What if the date inside a text box or date picker appears in the form as 10/18/08, but youd rather it be October 18, 2008, or 18-Oct-2008, or something else entirely? All you need to do is change the display format for the date orChanging the display time.format Customizing form controls
  35. 35. What if I don’t like how the date looks? To do this, your control must be one of the following three data types: • Date (date) • Time (time) • Date and Time (dateTime)Changing the displayformat Customizing form controls
  36. 36. What if I don’t like how the date looks? If your control uses an appropriate data type, you can specify exactly how you want dates and times to look. 1. To change the way the date displays, double-click the date picker control, and then click the Format button.Changing the displayformat 2. Pick a display format in the Date Format dialog box. Customizing form controls
  37. 37. Suggestions for practice1. Insert a date picker.2. Change the way the date displays.3. Configure a text box to display the current date.4. Configure a text box to display the current date and time.5. Fine-tune the text box (extra credit).Online practice (requires InfoPath 2003 Service Pack 1) Customizing form controls
  38. 38. Test 2, question 1Whats the difference between the today andnow functions? (Pick one answer.)1. The now function shows the current date and time; the today function shows only the current date.2. The today function shows the current date and time; the now function shows only the current date. Customizing form controls
  39. 39. Test 2, question 1: AnswerThe now function shows the current date and time; thetoday function shows only the current date. Customizing form controls
  40. 40. Test 2, question 2If you want the date inside a control to look likeAugust 18, 2008, instead of 8/18/08, whatwould you do? (Pick one answer.)1. Type over the date in the control.2. Change the data type.3. Change the display format for the control. Customizing form controls
  41. 41. Test 2, question 2: AnswerChange the display format for the control.If the data type for your control is Date (date), Time(time), or Date and Time (dateTime), you can change thedisplay format in the Properties dialog box for the control. Customizing form controls
  42. 42. Test 2, question 3How can you prevent people from typing over apreset date in a control? (Pick one answer.)1. You cant; people can opt to change these dates if they want to.2. Use data validation to display a warning message.3. Open the properties dialog box, and make the control read-only. Customizing form controls
  43. 43. Test 2, question 3: AnswerOpen the properties dialog box, and make the controlread-only.As you learned in the practice session, if you make a controlread-only, users can see the date but they wont be able tochange it. Customizing form controls
  44. 44. Lesson 3Hide or disable controls with conditional formatting
  45. 45. Hide or disable controls You may know that you can use conditional formatting to draw attention to controls in a form through the use of color and character formatting.Hide a control withconditional formatting. But did you know that you can also hide or disable a control — or even a whole section of a form — based on the value in another control? Customizing form controls
  46. 46. Conditional formatting refresher Conditional formatting is often used to highlight or call attention to specific, important, or sensitive information in a form. In InfoPath, you typically use conditional formatting to change the appearance of a control based on values users enter into your form. Customizing form controls
  47. 47. Conditional formatting refresher When you work with conditional formatting, you set conditions for formatting controls: • If the conditions are met, then InfoPath changes the appearance of the control. • If they arent met, no changes take place. Customizing form controls
  48. 48. Conditional formatting refresher Take a look at the example in the picture. In the second row, notice how the amount spent exceeds the amount budgeted? The form designer has used conditional formatting to draw attention to this fact. Customizing form controls
  49. 49. Conditional formatting refresher In this case, you can describe the condition as follows: “If the value in the Amount Spent box exceeds the value in the Amount Budgeted box, then apply red shading to the Amount Spent box.” Customizing form controls
  50. 50. Conditional formatting refresher To create conditions, use the Conditional Format dialog box, which is accessible from the Format menu in design mode, or through the properties dialog boxes for text boxes and other controls. Customizing form controls
  51. 51. Use a check box to show or hide a section One of the best ways to use conditional formatting is to show or hide a control based on the value entered or selected in another control. A typical way to do this is to design your form with a check box above a section so that selecting the check box hides or shows the section. Customizing form controls
  52. 52. Use a check box to show or hide a section For example, in an expense report, you might use conditional formatting to show a manager- approval section to people when their expenses total more than $1,000. If expenses are less than that, the section remains hidden in the form. Customizing form controls
  53. 53. Use a check box to show or hide a section Or, imagine a form in which you want people to be able to add an alternative shipping address. In this case, you might include an Add another address check box above an Alternative address section in your form. Customizing form controls
  54. 54. Use a check box to show or hide a section See the illustration at left. With conditional formatting, you can choose to hide an alternative address section by default. 1. When people select the Add another address check box… 2. …the Alternative address section appears in the form. Customizing form controls
  55. 55. Make text boxes read-only Along with its other uses, conditional formatting can make one or more controls read-only. A control can be read but not changed after a particular conditionRead-only text boxes is met — for example, after a check box is selected. Customizing form controls
  56. 56. Make text boxes read-only Conditional formatting can also be used to make each text box in the section read-only if a check box is cleared. See the illustration at left.Read-only text boxes 1. When the I accept the terms and conditions check box is not selected... 2. …people wont be able to fill out the registration boxes. Customizing form controls
  57. 57. Make text boxes read-only You can also disable buttons and other controls based on conditions in the form. When a control is disabled, it appears dimmed in the form.Read-only text boxes Customizing form controls
  58. 58. Suggestions for practice1. Use conditional formatting to show or hide a section.2. Test the behavior.3. Remove the conditional formatting from the section.4. Make text boxes inside the section read-only.Online practice (requires InfoPath 2003 Service Pack 1) Customizing form controls
  59. 59. Test 3, question 1Whats the best way to make a section disappearwhen a check box is selected? (Pick one answer.)1. Use conditional formatting.2. Use a rule.3. Use data validation. Customizing form controls
  60. 60. Test 3, question 1: AnswerUse conditional formatting.You can use conditional formatting to create an expandableand collapsible section or to hide a control based on a valueselected elsewhere in the form. Customizing form controls
  61. 61. Test 3, question 2How can you access the Conditional Formatdialog box? (Pick one answer.)1. By using either the Format menu or the Edit menu.2. By using the Format menu only.3. By using either the Format menu or by accessing a controls properties. Customizing form controls
  62. 62. Test 3, question 2: AnswerBy using either the Format menu or by accessing acontrols properties.To use the menu command, select the control first; to use acontrols properties dialog box, double-click the control.Then, look for the Conditional Formatting button on theDisplay tab. Customizing form controls
  63. 63. Test 3, question 3When you use conditional formatting to make atext box read-only, how does its appearancechange? (Pick one answer.)1. The text boxs appearance doesnt change in any way.2. The text box appears dimmed.3. The text box turns red. Customizing form controls
  64. 64. Test 3, question 3: AnswerThe text boxs appearance doesnt change in any way.The appearance of the text box doesnt change; users justcant type in it. Customizing form controls
  65. 65. Lesson 4Add up numbers in a table
  66. 66. Add up numbers in a table You dont have to be a math whiz to work with numbers in InfoPath. Learn how easy it is to use the sum function to add up numbers in a repeating table.A running total in arepeating table Customizing form controls
  67. 67. Anatomy of a repeating table When you want people to be able to add multiple rows to a table, you can use a repeating table in yourThe repeating table in form.design mode Repeating tables are great for collecting line items or numerical data. Customizing form controls
  68. 68. Anatomy of a repeating table There are three parts to a repeating table, as shown in the picture: 1. Header rowThe repeating table indesign mode 2. Data row 3. Footer row Customizing form controls
  69. 69. Anatomy of a repeating table The header row: When you insert a repeating table in a new blank form, the header row appears byThe repeating table in default.design mode Customizing form controls
  70. 70. Anatomy of a repeating table The data row: The data row is the meat of the table, the row that can "repeat" in the form as many timesThe repeating table in as necessary.design mode Customizing form controls
  71. 71. Anatomy of a repeating table The footer row: You can use the footer row to add boxes that total up the values in a column.The repeating table indesign mode Customizing form controls
  72. 72. Anatomy of a repeating table 1. The shortcut menu button appears whenever form users move their mouse over a row. Users click it to see a shortcut menu of commands for inserting or removing a row.The repeating table inthe user’s view 2. The user can also insert a new row by clicking Insert item. As the form designer, you can customize or turn off this text. Customizing form controls
  73. 73. The sum function If you use a repeating table to collect numerical data from your users, you can use the sum function to add up numbers in the table.The sum function totalsthe column’s values in arepeating table. Customizing form controls
  74. 74. The sum function Important: When working with repeating tables, you should add the Total box to the footer row, not the data row. Thats because form users can add multiple instances of the data row, and you wouldnt want the Total box to show up multiple times in the users form.The sum function totalsthe column’s values in arepeating table. Customizing form controls
  75. 75. Suggestions for practice1. Add a footer row to a repeating table.2. Add a Total box.3. Do the math.4. Test the user experience.5. Format the footer row.6. Make the Total box read-only.Online practice (requires InfoPath 2003 Service Pack 1) Customizing form controls
  76. 76. Test 4, question 1The person filling out the form can add extra footerrows to a repeating table. (Pick one answer.)1. False.2. True. Customizing form controls
  77. 77. Test 4, question 1: AnswerFalse.People completing a form can only add additional data rows —thats the whole point of a repeating table. Customizing form controls
  78. 78. Test 4, question 2If you wanted to total numbers in a repeatingtable, which of the following formulas wouldyield a correct result? (Pick one answer.)1. sum(field1)2. =sum(field1)3. sum(field1:field8) Customizing form controls
  79. 79. Test 4, question 2: Answersum(field1)This formula would add up all instances of field1 in a form. Customizing form controls
  80. 80. Test 4, question 3In design mode, which row doesnt appear by defaultafter you insert a repeating table? (Pick one answer.)1. The data row.2. The footer row.3. The header row. Customizing form controls
  81. 81. Test 4, question 3: AnswerThe footer row.If you want a footer row for your table, you have to select acheck box in the Repeating Table Properties dialog box. Customizing form controls
  82. 82. Quick Reference CardFor a summary of the tasks covered in this course, view theQuick Reference Card. Customizing form controls

×