Creating a conditionSet
Hi Peter,
it's rather silly; you only can see the Condition Set feature if you expand the feature set of the Conditional Text panel.
From my German InDesign; Conditional Text panel not expanded vs expanded:

@PauloJC ,
note, that the value for setConditions must be an array of arrays.
See into the DOM documentation for this:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ConditionSet.html
The following sample will work:
var doc = app.documents[0];
var firstCond = doc.conditions.add
(
{
name : "Condition 1"
}
);
var secCond = doc.conditions.add
(
{
name : "Condition 2"
}
);
var myCondSet = doc.conditionSets.add
(
{
name : "Hide 1 Show 2",
setConditions :
[
[ firstCond , false ] ,
[ secCond , true ]
]
}
);
doc.conditionalTextPreferences.activeConditionSet = myCondSet ;
Result:

Regards,
Uwe Laubender
( Adobe Community Professional )
PS: Link to DOM documentation added.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.