cancel
Showing results for 
Search instead for 
Did you mean: 
aclements
Ranger
Status: New

We are asking for the implementation of a lab feature (beta) that is not currently in the product.  There is a need to use presentation variables in a business schema view created with SQL.    It would be very useful to use the presentation variable in SQL to populate fields that otherwise would be impossible to calculate in the dashboard. 

We have been working with the product owner through an Incorta Support Request.  Using 'getsysval' completes successfully but is not what we need The same code errors when using 'getpresval'.  It was suggested in the ticket that we post a request here to have the feature implemented.

 

Here is the documentation that outlines the use:
 
 

Here is a sample SQL that will run with getsysval but fails with getpresval for the date calculation.

select mtl.transaction_date,  date(getsysvar('currentMonthStart''09/01/2024')), date(getsysvar('currentMonthStart''08/31/2024')) - INTERVAL '1 days',
case when (mtl.transaction_date) < date(getsysvar('currentMonthStart''09/01/2024'))
     then date(getsysvar('currentMonthStart''08/31/2024')) - INTERVAL '1 days'
     else (mtl.transaction_date) end comp_trans_date
from sch_MTL_MATERIAL_TRANSACTIONS.tbl_MtlMaterialTransactions mtl
where mtl.organization_id=366
and mtl.transaction_id>=281993774