4 Replies Latest reply: Nov 25, 2015 9:36 PM by Robin Brown RSS

    Reusable Expression Problem

    Robin Brown

      I've managed to create the following reusable expression in the Document's Variable Overview editor but I can't work out how to define it using a LET/SET statement in the load script.  The problem is the requirement for single quotes arount the $1 argument.  I've tried every alternative for avoiding literal quotes that I can think of but nothing works.  Can anyone help?

       

      Chr(40)&Round(100*Sum($(='$1'&vShowDays))/Sum(ServiceRequests),1)&Chr(37)&Chr(41)

       

      The expression takes an argument, eg "Reprocessed" and adds the postfix in the variable "vShowDays" ("14" or "60") to get the actual dimension name, eg "Reprocessed14".  It then sums it, converts to % and wraps the result in "(result%).  It works perfectly when created in the Variable Overview editor, I just can't find a way to define it in the load script?

       

      Robin