Inject Application Property into AppFolder Quantity Query

Hi guys,

Is it possible to do something like this in the quantity script for the AppFolders?

def em = persistence.getEntityManager();
 def q = em.createQuery('select count(e) from billing_ItemsWithoutContract e where e.startDate >= ?1').setParameter(1, AppBeans.get(Configuration.class).getConfig(BillingConfig.class).getBillingEffectiveStartDate())
 def count = q.getSingleResult()
 style = count > 0 ? 'emphasized' : null
 return count

Can’t seem to get it to work…

Have you tried to add imports to the top of the script?
A groovy script like any Java file, requires imports for used classes.