Visual Builder

Get Involved. Join the Conversation.

Topic

    Mayank Srivastava
    Access Application or Flow level variables through java...
    Topic posted July 23, 2019 by Mayank SrivastavaGreen Ribbon: 100+ Points, tagged Custom Code, REST, Services 
    20 Views, 1 Comment
    Title:
    Access Application or Flow level variables through java script in VBCS
    Summary:
    Access and manipulate Application or Flow level variables through java script in VBCS
    Content:

    I have added few variables at application leven and flow level with session scope. I want to access or manipulate that variable values through my JS code in order in avoid writing the same code again and again. 

    For example: I am calling the rest endpoint in my action chain and I have set the parameters of that rest endpoint in those variables. Now i want to reuse the existing action chain with different paramters. One option is to create a new action chain and set those values again and other option which i am looking is to directly change the values of the variables through JS and call the action chain again.

    Please let me know the feasibility if that is possible and any reference which could be helpful.

    Comment

     

    • Bshah
      You can pass values of those variables as parameters to your javascript function. Then after manipulating them, you can return them back from the function. In the action chain, use assign variable method to assign them back to application or flow level variables.