Code studio - Get value of a referenced variable

How can you get the value of a variable with a variable_id reference in the code studio?

Getting form values seems fine but I haven’t found a method of getting the value of a variable I created in build. I have a variable_id reference and can output the ID fine but from this reference can I get the value defined in build? I’ve tried mats.read and various other methods without success.

Edit: This is to be used in a Fragment Validator.

Hi James, my name is Mark. I am a Solutions Developer here at MatsSoft. I am here to help you. I will reply with an answer for you shortly. Thank you for using the Community Forum to ask this question.

MP

Hi James can you please tell me what version of Mats you are using as this will impact the answer we provide. Thanks - MP

Hi Mark thanks for looking into it. I’ve only tried it in v10.1 but if there is a solution in 10.2 I would be interested in this too.

Well there is a way around it in 10.1 utilising a record search, but in 10.2 there is actually a new function that you could use that is slicker. I will respond later once I have all the information. And you are welcome. This is the kind of situation we are happy to address via the community forum as it benefits all Mats Users. I hope you are finding the Community an increasingly useful resource, as we grow it’s capabilities. Regards - MP