Select Page

Programmed elements in a dynamic document for XMPie uStore can be built using JavaScript instead of QLingo. Follow the steps below:

  1. Don’t use JavaScript in InDesign with the ADOR objects. All of the programming will take place in uPlan.

  2. In uPlan, create the variables and campaign dials for the ADOR objects that will be used as variables in functions.

  3. Create the function in JavaScript.

    function ShowPersonalCorporation (star1, star2, star3)
    {
     if (star1 || star2 || star3)
       return "*Personal Real Estate Corporation";
    }

  4. 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”;

}

Print Friendly, PDF & Email
Translate »