Add formatting guidelines

Add formatting guidelines

With Microsoft InfoPath 2010, you may specify management formatting guidelines which can be based mostly on situations that happen within the kind. If the desired situations are true when a consumer fills out a kind with formatting guidelines, then the formatting is utilized. Formatting guidelines can be utilized to use daring, underline, italic, strikethrough, font colour, and background colour to controls; or disguise/present or disable controls.

On this article

Formatting rule examples

Add formatting

Use the Add Rule button

Use the Guidelines job pane

Information entry patterns

Superior situation eventualities

Formatting rule examples

The next are some examples of the right way to use formatting guidelines in a kind template:

  • Cover the transport tackle part except the Specify Transport Handle verify field is chosen.

  • Change the font colour to blue and the font model to daring for all bills that require a receipt.

  • Change management background colour in a repeating desk based mostly on the worth of a textual content field within the row. For instance, make all controls pink in a row for an overdue merchandise and inexperienced for objects which can be on schedule.

  • Mark monetary entries with pink textual content when they’re lower than $zero and inexperienced textual content when they’re $zero or extra.

  • Filter rows in a repeating desk.

Word:  You can even use a validation rule to show a message when a consumer enters incorrect values right into a kind.

High of Web page

Add formatting

Use the Add Rule button

Out-of-the-box formatting guidelines will be added through the use of the Add Rule command.

  1. Click on a management.

  2. On the Residence tab, within the Guidelines group, click on Add Rule.

Add formatting rules

  1. Click on the kind of situation that the rule wants to fulfill as a way to apply, reminiscent of Is Clean if you need the rule to use if the worth of the sector is clean.

  2. Click on the kind of formatting to use, reminiscent of shading the background colour of the cell or modifying the font to point a warning.

Word:  Relying on the kind of situation that you simply selected, you is perhaps requested to enter further data.

When completed, the Guidelines job pane seems and you can also make any vital modifications to the rule.

Use the Guidelines job pane

Full the next steps so as to add a formatting rule from the Guidelines job pane:

  1. Create a formatting rule

    1. Click on a management.

    2. If the Guidelines job pane isn’t seen, then, on the Residence tab, within the Guidelines group, click on Handle Guidelines.

    3. Click on New.

      Add formatting rules

    4. Click on Formatting.

    5. Enter a reputation for the rule within the Particulars for textual content field.

  2. Specify the situations.

    1. Within the situation part, click on None.

      Add formatting rules

    2. If the situation in your rule is predicated on a subject, full the next:

      1. Within the first field, click on a subject or choose Choose a subject or group.

      2. Within the second field, click on an operator reminiscent of is the same as.

      3. Within the third field, enter a worth.

        Word:  It’s also doable to base a rule on an expression or a set of signable information. For extra details about these superior eventualities, see the corresponding part beneath Superior situation eventualities.

    3. Click on And so as to add one other situation, after which repeat step 2 or click on OK.

      Word:  After including a second situation, the And button is changed with a field. Go away and chosen if each the primary and every subsequent situation must be true for the conditional formatting to be utilized. In any other case, if solely one of many situations ought to be true for the conditional formatting to be utilized, click on or.

  3. Specify the formatting.

    1. Make the specified choices from the Formatting part. From this part you may point out that textual content within the management is daring or underlined, change the colour of the textual content or background colour of the management, or activate or off the management.

Word:  In the event you add a number of formatting guidelines and a couple of is true, solely the formatting for the primary true situation is utilized.

Information entry patterns

Formatting guidelines will be based mostly on the textual content sample {that a} consumer enters right into a textual content subject. For instance, if you wish to accumulate a United States ZIP code, you then need to ensure that solely 5 numbers, no much less, no extra, and no alphabetical characters are entered. Likewise, if you need a consumer to enter an electronic mail tackle , then you may match the enter to a sample that features textual content, an “@” image, a site, and a site suffix reminiscent of “.com”.

To do that, from the Operator textual content field, choose Matches Sample when constructing the situation, after which choose the Choose a sample choice. The Information Entry Sample dialog seems, from which you’ll be able to choose from a number of pre-defined, customary patterns. If considered one of these patterns doesn’t meet your wants, then you may point out a customized sample. Customized patterns can require using particular characters, which will be simply inserted by deciding on them from the Insert particular character field.

Superior situation eventualities

The next are superior eventualities that you should utilize when setting the situation of an information formatting rule.

  • Base a rule on an expression

An expression is a set of values, fields or teams, capabilities, and operators. You need to use an expression to set the worth of a subject in such eventualities as routinely together with right this moment’s date on a kind, or including the price of objects entered into an expense report back to get the entire.

  1. Within the first field, click on an expression.

  2. Within the second field, enter the expression.

  • Base a rule on a set of signable information

If a kind requires a digital signature and it has not been signed, you would possibly need to disable the submit button. Or, for instance, you may set the background colour of the Signature subject be a pink till a the shape is signed. This situation is just supported in InfoPath Filler varieties.

  1. Within the first field, click on Choose set of signable information.

  2. Within the Choose Set of Signable Information dialog field, choose the set of signable information, after which click on OK.

  3. Within the second field, click on a situation, after which, within the third field, choose any vital standards.

Word:  For extra data, see Digital Signatures in InfoPath 2010.

  • Base a rule on a consumer’s function

Whereas it’s doable to create a kind with completely different views, and show the suitable view to a consumer, based mostly on their function, it is usually doable to have one view for all customers, and conceal or show particular person controls within the view to a consumer based mostly on their function. You can even use this to routinely fill in a consumer’s supervisor, division, or different data, based mostly on their function. Person roles are solely supported in InfoPath Filler varieties.

  1. Within the first field, click on Person’s present function.

  2. Within the second field, click on the operator, reminiscent of is the same as.

  3. Within the third field, click on the function or Handle roles to handle consumer roles.

High of Web page

Leave a Reply