From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- .../source/text/swriter/guide/conditional_text.xhp | 115 +++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 helpcontent2/source/text/swriter/guide/conditional_text.xhp (limited to 'helpcontent2/source/text/swriter/guide/conditional_text.xhp') diff --git a/helpcontent2/source/text/swriter/guide/conditional_text.xhp b/helpcontent2/source/text/swriter/guide/conditional_text.xhp new file mode 100644 index 000000000..5a064b4ac --- /dev/null +++ b/helpcontent2/source/text/swriter/guide/conditional_text.xhp @@ -0,0 +1,115 @@ + + + + + + + Conditional Text + /text/swriter/guide/conditional_text.xhp + + + + + + + matching conditional text in fields + if-then queries as fields + conditional text; setting up + text; conditional text + defining;conditions + + + +Conditional Text +You can set up fields in your document that display text when a condition that you define is met. For example, you can define the conditional text that is displayed in a series of reminder letters. +Setting up conditional text in this example is a two-part process. First you create a variable, and then you create the condition. + +To Define a Conditional Variable +The first part of the example is to define a variable for the condition statement. + + + + Choose Insert - Field - More Fields, and then click the Variables tab. + + + Click "Set variable" in the Type list. + + + Type a name for the variable in the Name box, for example Reminder. + + + Click "Text" in the Format list. + + + Enter 1 in the Value box, and then click Insert.
The Format list now displays a "General" format.
+
+
+ +To Define a Condition and the Conditional Text +The second part of the example is to define the condition that must be met, and to insert a placeholder for displaying the conditional text in your document. + + + + Place the cursor where you want to insert the conditional text in your text. + + + Choose Insert - Field - More Fields, and then click the Functions tab. + + + Click "Conditional text" in the Type list. + + + Type Reminder EQ "3" in the Condition box. In other words, the conditional text will be displayed when the variable in the field that you defined in the first part of this example is equal to three. + The quotation marks enclosing the "3" indicate that the variable that you defined in the first part of this example is a text string. + + + + + + Type the text that you want to display when the condition is met in the Then box. There is almost no limit to the length of the text that you can enter. You can paste a paragraph into this box. + + + Click Insert, and then click Close. + + + +To Display the Conditional Text +In this example, the conditional text is displayed when the value of the conditional variable is equal to 3. + + + + Place your cursor in front of the field that you defined in the first part of this example, and then choose Edit - Fields. + + + Replace the number in the Value box with 3, and then click Close. + + + If the field does not automatically update, press F9. + + + +
+ + + +List of conditional operators +
+ + +
\ No newline at end of file -- cgit v1.2.3