Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy - Issue passing environment variable to calc script template

edited Oct 15, 2020 7:48PM in Planning 10 comments

Summary

Environment variable defined in groovy script is not passing over to calc script template

Content

Hello,

We are defining an environment variable in our groovy template and then passing it as a parameter to a calc script template. The issue is that the groovy template fails to compile and requests that the variable be escaped with {}. When we add the {} brackets we still get the same error (see both examples below, blue font; error has been uploaded as an image): 

  1. assignScript = """%Template(name:="CAP_OL_CALC_Shift Out",application:="DCAT",plantype:="DCATPLN",dtps:=("Company_Code":=[[$rtps.Company_Code]],"ShiftAccount":=[[$rtps.ShiftAccount]],"ShiftAmount":=[[$rtps.ShiftAmount]],"ShiftBlock":=[[$rtps.ShiftBlock]],"ShiftPeriod":=[[$rtps.ShiftPeriod]],

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!