Get Text

Description

Retrieves text from the document and assigns it as the value of a variable. The text can be from selected text frames or in tags in a selected object or in an object in a selected Super Group. To apply tags to objects, open the tags panel from the InDesign menu by going to Window > Utilities > Tags. Then create a new tag, hi-light the text you wish to tag, and click on the tag name. For more on XML tags, see the topic article XML Tags.

Works On
This option works on variables within the flow. It works with text in  selected text frames or text in tags in a selected object or in a selected Super Group.
Changes Selection
This action does not change the selection.

Location

The Get Text action is located in the Fuga Workshop panel under the Text actions category.

Examples

Getting Text From an XML Tag

In this example, tagged text from a selected object is loaded into a variable.

Action Setup


Action Result

Getting Text From Multiple XML Tags

In this example, text from multiple XML Tags is loaded into variables. Tag names must be entered along side variable names (which is different then some other actions which use mapping). Although the tags in this example are in the same text frame, text from tags can also be loaded from multiple selected frames.

Action Setup


Action Result

Parameters

General Parameters

Get Text Type Drop-down
Provides different options for how to get the text. 

  • Get All Text – Gets all the text from a text frame and sets it as the value of a variable.
  • Get Text From XML Tag – Gets all the text from the specified XML tag and sets it as the value of a variable.
  • Map Tags To Variables – Gets all the text in multiple specified XML tags and sets the text as the values of corresponding variables, as assigned to each XML tag individually.
Set Text Into Variable Drop-down
Specifies which variable’s value you would like to set as the text. This parameter is not visible if the Map Tags To Variables option is selected from the Get Text Type Drop-down, since it’s replaced by the Mapping table.
XML Tag Field
(string) The XML tag to get text from. This option is only visible if the Get From XML Tag option is selected from the Get Text Type Drop-down.
Multiple Occurrences Drop-down
Specifies what to do when there are multiple text frames selected. 

  • First Occurrence Only - Gets text from only one of the text frames.
  • All Occurrences Delimited By: - Gets the text from each text frame in the selection as a delimited string (e.g., frame1,frame2,frame3)
  • All Occurrences Concatenated- Gets the text from each text frame as a concatenated string (e..g, frame1frame2frame3)
Delimiter Field
(string) The character by which to separate the delimited string. This field is only relevant when the All Occurrences Delimited By: option is selected from the Multiple Occurrences drop-down.

Mapping Table

This table is only visible when the Map Tags To Variables option is selected from the Get Text Type drop-down. You must insert both the tag name and the variable for this to work (unlike other actions where mapping can take place automatically).

Variable Column
(string) Each row specifies which name of the variable whose value to set as the text from the corresponding tag (as specified in the Tag column of the same row). To insert a variable into the column, click the + button on the right side of the workshop and select the variable to insert.
Tag Column
(string) Each row specifies the XML tag whose text to set as the value of the variable.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>