Description
Checks to see if a condition is true, and if it is performs the set of actions nested inside the action. When If the Else check-box is checked, Fuga will perform an alternative set of actions if the condition is false.
Different types of comparisons are used when comparing strings and numbers. For example, when checking if two number are the same the Equal Sign ( = ) option should be used, but when checking if two strings are the same the Matches option should be used.
For more on the If action, see the topic article on Conditionals.
- Works On
- The actions within it inside the flow.
- Changes Selection
- This action does not change the selection.
Location
Examples
A Basic String If Example
A Numeric If Example with an Else
And Advanced If Example
An If Example With Multiple Conditionals
Parameters
- If Type Drop-down
- What type of If action to perform.
- Regular Condition – Provides parameters for creating a statement comparing two values. If the statement is true, then Fuga performs the actions inside the If action.
- Advanced Condition – Provides parameters for creating a statement that checks for something in the InDesign document (e.g., if “Selection Is Overset”). If the statement is true, then Fuga performs the actions inside the If action.
- Multiple Conditions – Provides parameters for performing two comparisons. If both or either of these statements are true, then Fuga performs the actions inside the If action.
- First Value Field
- The value to be compared to the value in the Second Value field.
- Second Value Field
- The value to be compared to the value in the First Value field.
- Regular Comparison Drop-down
- How to compare the two value fields. String comparisons are all case-sensitive (e.g. “Capital” does not match “capital”).
- Matches – Compares two strings to see if they are the same.
- = – Default. Compares two number to see if they are equal.
- > – Compares two numbers to see if the first is greater than the second.
- >= – Compares two numbers to see if the first is greater than or equal to the second.
- <= – Compares two numbers to see if the first is less than or equal to the second.
- < – Compares two numbers to see if the first is less than the second.
- Contains – Compares two strings to see if the first contains the second.
- Ends With – Compares two strings to see if the first one ends with the second.
- Begins With – Compares two strings to see if the first one begins with the second.
- Does Not Match – Compares two strings to see if the first one does not match the second.
- Does Not Contain – Compares two strings to see if the first one does not contain the second.
- Does Not Begin With – Compares two strings to see if the first one does not begin with the second.
- Does Not End With – Compares two strings to see if the first one does not end with the second.
- Contains Number Above – Compares a string (the first value) to a number (the second value) to see if the string contains a number that is above the number in the second value.
- Contains Number Below – Compares a string (the first value) to a number (the second value) to see if the string contains a number that is above the number in the second value.
- Matches As UPC – Checks a string to see if it matches another string as a UPC. UPC stands for unique product code, and UPCs are sometimes combined together. They can be combined into a comma delimited string (e.g., “12345,123456″ contains 12345 and 12346), have their last digits separated by a slash (e.g., “12345/6/77″ contains 12345, 12346, and 12377), or have the the range of their last digits indicated by a dash (e.g., “12345-7″ contains 12345, 12346, 12347). They can even be combined using all these options in a comma delimited string (“12322,12345/6/77,12388-93″).
Regular Condition Parameters
These parameters are visible when the Regular Condition option is selected from the If Type drop-down.
Advanced Condition Parameters
- Advanced Condition Drop-Down
- This drop-down is visible when the Advanced Condition option is selected from the If Type drop-down.
- Any Object selected – Default. Checks if any object is selected.
- No Object selected – Checks if no object is selected.
- More than one Object selected – Checks if multiple objects are selected.
- One Object selected – Checks if one object is selected.
- One SuperGroup selected – Checks if a single Super Group is selected.
- More than one SuperGroup selected – Checks if multiple Super Groups are selected.
- Selection contains Object named: – Checks if there is an object with a specific name in the selection.
- Selection does not contain Object named: – Checks if there is not an object with a specific name in the selection.
- Active Page contains Object named: – Checks if there is an object with a specific name on the active page.
- Active Page does not contain Object named: – Checks if there isn’t an object with a specific name on the active page.
- Active Spread contains Object named: – Checks if there is an object with a specific name on the active spread.
- Active Spread does not contain Object named: – Checks if there is an object with a specific name on the active spread.
- Document does not contain Layer named: – Checks if there is a layer with a specific name in the document.
- Document does not contain Layer named: – Checks if there isn’t a layer with a specific name in the document.
- Document contains Version named: – Checks if there is a version with a specific name in the document.
- Document does not contain Version named: – Checks if there isn’t a version with a specific name in the document.
- All Frames in selection are empty – Checks if all of the frames in the selection are empty.
- Any Frame in Selection is empty – Checks if any of the frames in the selection are empty.
- Any Error was raised: – Checks if an error was raised by the last action performed.
- Name Field
- (string) The name of the object, layer, or version to check for. This option is only visible if one of the “contains…named:” or “does not contain…named:” options are selected from the Advanced Condition drop-down.
Multiple Condition Parameters
These parameters are the same as the Regular Condition parameters, with the addition of the AND/OR drop-down menu and an additional set of fields.
- AND/OR Drop-down
-
- OR – Performs the actions inside the If action if either of the statements are true.
- AND – Performs the actions inside the If action if both of the statements are true.




