Skip to Content

HCI Global Variable by Groovy script

Hello friends,

Is is possible to access the Global Variables by groovy script in HCI? I need to access and modify.

I want to use the groovy because it is not possible to use the Write Variable passing in the name of variable a dynamic parameter. like ${property.DynVariable}, HCI will create a variable with name ${property.DynVariable}, not with the value of this property.

Thank you

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Jul 04, 2018 at 10:11 AM

    Hi Kaleo,

    This doesn't seems to be correct.

    If you mention the "${property.DynVariable}" and Type as expression it must work.

    This is the expected behavior.

    Please share the screenshot if its not working.

    thanks and regards,

    Praveen T

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 04, 2018 at 10:39 AM

    Hi Praveen,

    I am setting dynamic the name of variable and the value.

    The problem is, a variable will be create with name ${property.DynVariable}, not with the value of that.

    Thank you.

    Kaleo


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 04, 2018 at 10:51 AM

    Hi Kaleo,

    You can create variable using write variable and then in save it as property in Content Modifier after which you can the property in a groovy script.

    Regards,

    Merina

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 16, 2020 at 03:28 PM

    Hello does you know how to read dynamicly a global variable?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.