Prihláste sa s kontom Microsoft
Prihláste sa alebo si vytvorte konto.
Dobrý deň,
Vyberte iné konto.
Máte viacero kont
Vyberte konto, s ktorým sa chcete prihlásiť.

Poznámka:  Radi by sme vám čo najrýchlejšie poskytovali najaktuálnejší obsah Pomocníka vo vašom vlastnom jazyku. Táto stránka bola preložená automaticky a môže obsahovať gramatické chyby alebo nepresnosti. Naším cieľom je, aby bol tento obsah pre vás užitočný. Dali by ste nám v dolnej časti tejto stránky vedieť, či boli pre vás tieto informácie užitočné? Tu nájdete anglický článok pre jednoduchú referenciu.

In Microsoft Office InfoPath, you can create different views of the same form template. A view is an alternative way to present data in a form template. When filling out forms based on your form template, users can switch between views to choose the amount of data that is shown in the form. For example, in a status report form template, you might design a summary view in addition to a detailed view. Users can then choose which view they want to look at, depending on what type of information they need.

Views are often designed to work with rules. Rules enable you to automate certain tasks in a form template in response to events or actions initiated by the person filling out the form. For example, this article describes how you can insert a button on your form template, and then create a rule that switches views when that button is clicked.

Obsah tohto článku

Step 1: Insert a button in each view

Poznámka: To complete the following procedure, you must have a form template with two existing views. Find links to more information about creating views in the See Also section.

  1. On the View menu, click Manage Views.

  2. Under Select a view, click the view that you want to add a button to.

  3. On the form template, place your cursor where you want to insert the button.

  4. On the Insert menu, click More Controls, or press ALT+I, C.

  5. Under Insert controls, in the Controls task pane, click Button.

  6. On the form template, double-click the button that you just inserted.

  7. Kliknite na kartu Všeobecné.

  8. In the Label box, type the text that you want to appear on the button, and then click OK.

  9. On the View menu, click Manage Views.

  10. Under Select a view, click the name of the second view.

  11. Follow steps 3 through 8 to add a button to the second view.

Top of Page

Step 2: Create a rule that switches views

After you have added buttons to each view in your form template, you need to create the rules that switch views when users click those buttons.

  1. On the View menu, click Manage Views.

  2. Under Select a view, click the view that you want to work with.

  3. On the form template, double-click the button that you inserted in the previous procedure.

  4. Kliknite na kartu Všeobecné.

  5. In the Action list, click Rules and Custom Code.

  6. Click Rules.

  7. In the Rules dialog box, click Add.

  8. In the Name box, type a name for the rule, such as Switch to View 2. You will see this name when working with the view in design mode. However, the name won't be seen by people filling out the form.

  9. Click Add Action.

  10. In the Action list, click Switch views.

  11. In the View list, click the view that you want to switch to, and then click OK.

  12. Click OK to close all of the open dialog boxes.

  13. In the Views task pane, under Select a view, click the second view.

  14. Follow steps 3 through 12 to create a rule for the button in the second view.

Top of Page

Step 3: Test the user experience

After you have added buttons to your views and created the necessary rules, it is a good idea to test your form template to ensure it works as expected.

  1. Ak chcete otestovať vykonané zmeny, na štandardnom paneli s nástrojmi, kliknite na príkaz Ukážka alebo stlačte kombináciu klávesov CTRL + SHIFT + B.

    Poznámka: The view that you were working in most recently is the view that will appear in the preview window.

  2. To test that the buttons for switching views are working properly, click the buttons that you created in the previous procedure.

Top of Page

Potrebujete ďalšiu pomoc?

Chcete ďalšie možnosti?

Môžete preskúmať výhody predplatného, prehľadávať školiace kurzy, naučiť sa zabezpečiť svoje zariadenie a ešte oveľa viac.

Komunity pomôžu s kladením otázok a odpovedaním na ne, s poskytovaním pripomienok a so získavaním informácií od odborníkov s bohatými znalosťami.

Boli tieto informácie užitočné?

Aká je podľa vás jazyková kvalita textu?
Čo sa vám páčilo, prípadne čo nie?
Stlačením tlačidla Odoslať sa vaše pripomienky použijú na zlepšenie produktov a služieb spoločnosti Microsoft. Váš správca IT bude môcť tieto údaje zhromažďovať. Vyhlásenie o ochrane osobných údajov.

Ďakujeme za vaše pripomienky!

×