Skip to main content

DOCX Output (Phrases) - Knowledgebase / Lasernet / Lasernet Training / Lasernet Form Editor 9 - Rich Text and Spreadsheet - Formpipe Support Portal

DOCX Output (Phrases)

Authors list


Introduction

The Phrase tool is designed to add definite content as a stand-alone entity to a document or a report. For example, you need to create several reports for different departments; with that, all reports are to contain the same fragment. So, to avoid adding the fragment to each report separately, you can only create a global phrase, add this fragment to this phrase, and then insert it to each report. It could be, for example, a company legal information fragment, etc. For this purpose, global phrases are recommended to use.

On the other hand, you would like to show one fragment and hide another one in your output based on certain criteria, or vice versa. To this end, it is recommended to create the required number of inline phrases and specify certain criteria for each of them based on the DataSet input or JobInfos.

In this exercise, you are proposed to update the available auto vacation reply template with a signature which is added as a phrase, specify a criterion to this phrase, based on which two different versions of signature texts can be shown: a short one for the internal use and a full one for the external use.

Exercise

Start with downloading and importing the attached configuration called 07. DOCX Output (Phrases) in Lasernet Developer 9. Afterwards, go to the Forms section and open the Sample form.

Once you are done, follow the steps listed below.

1. Place the cursor at the end of the last line, and then press three times the ENTER key to move it down. So, you have created three blank lines between the last paragraph and a signature you are to add.


Note: To be precise in modifying your layout, you can enable showing paragraph marks and other hidden formatting symbols. To this end, click the Show/Hide button on the Property bar.

2. On the Developer toolbar, click Phrase, and then click Insert Inline Phrase....



3. In the Phrase dialog displayed, type a phrase name (Internal), and then click the Edit button.


4. In the Inline Phrase dialog displayed, type a phrase text as it is shown on the picture below.

5. For the text, specify the following font style values: Segoe UI, 14 pt.

6. Click the Save button, and then click a little cross to close the dialog.


Once you are done, click Ok in the Phrase dialog to save changes.

7. In the output, right-click the phrase you have just added, and then click Add DataSet Criterion... on the context menu that appears.


8. Click the internal node in dataset.

9. In the dialog displayed, click Ok to confirm changes.


Afterwards, click Ok once again in the Phrase dialog displayed.

10. Switch to the External.xml grab file tab in the input. Instead of the phrase text you have just added based on the Internal.xml grab file, you can see a notification that criteria are not met. It is so because the internal field value for the External.xml grab file is set to false.

11. Click the Preview button, and you can see that no text is shown in the External.xml output as a signature you have added based on the Internal.xml input.


You are now proposed to add a phrase based on the External.xml grab file and specify a criterion for it (internal field value = false). To this end, follow the steps listed below:

12. Place the cursor at the end of the notification text in the output.

13. On the Developer toolbar, click Phrase, and then click Insert Inline Phrase....


14. In the Phrase dialog displayed, type a phrase name (External), and then click the Edit button.


15. In the Inline Phrase dialog displayed, enter a text of the signature for the external use.

  • First, type the following text:

    Kind regards, (specify the following font style values: Segoe UI, 14 pt)

    OLA NORRMAN (specify the following font style values: Segoe UI, 10 pt, Bold)

    Information Assistance Specialist (specify the following font style values: Segoe UI, 10 pt)

    Formpipe Lasernet (specify the following font style values: Segoe UI, 10 pt)

  • Afterwards, drag fields from the dataset in the following order:

    companyaddress

    zipcode

    companyphonenumber

    logo (the field has a base64 string as a value, that is why an image is inserted. Note that the image is inserted in its original size. To resize it, drag one of the control points on the sides or corners of the selection box)

    For the text fields you have dragged, specify the following font style values: Segoe UI, 10 pt.

As a result, the signature looks as follows:


Once you are done, click the Save button to save all changes, and then click a little cross to close the dialog. Afterwards, click Ok once again in the Phrase dialog.

Let's now add a criterion for the phrase you have just added. To this end, repeat steps 7-9.

As a result, you have now two versions of the signature, each of which is shown in the document according to the specified criterion. To view the required version of the document, click the Preview being switched to the required tab.

Preview of the internal signature version:


Preview of the external signature version:


Important: Phrases are not a part of the standard Lasernet Rich Text license. Phrases requires an additional Lasernet license. If no valid license is found the areas that contains the phrases will be left empty.

Helpful Unhelpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share