Programmed elements in a dynamic document for XMPie uStore can be built using JavaScript instead of QLingo. Follow the steps below:
-
Don’t use JavaScript in InDesign with the ADOR objects. All of the programming will take place in uPlan.
-
In uPlan, create the variables and campaign dials for the ADOR objects that will be used as variables in functions.
-
Create the function in JavaScript.
function ShowPersonalCorporation (star1, star2, star3)
{
if (star1 || star2 || star3)
return "*Personal Real Estate Corporation";
} -
Call the function in the ADOR object.
ShowPersonalCorporation (@{_Star1}, @{_Star2}, @{_Star3})
Testing for Null Values
In QLingo, you would test for a null value by using the IsNullOrEmpty function, which would return a value based on its result (true: display real estate info; false: display nothing):
if (!IsNullOrEmpty (@{_Star1}))
{
“*Personal Real Estate Corporation”
}
else
{
“”
}
The JavaScript equivalent is:
function ShowPersonalCorporation (star)
{
if (star)
return “*Personal Real Estate Corporation”;
}