Read Constant value from a Pluggable Widget

0
Hi Forum, I would like to know if there is a way to Read "Constant" value defined in Studio Pro from a Pluggable Widget? Like, can I use Client API or Mendix Platform SDK to achieve this? Thanks in advance.
asked
1 answers
0

You can get all the constants that have been exposed to the client using…

mx.session.getConstants();

You’ll need to find the constant by name there, probably using a filter(). When you have that, you can call the .value() method to get the value.


https://docs.mendix.com/refguide/constants#:~:text=When%20a%20constant%20is%20exposed,is%20exposed%20to%20the%20client.

Hope this helps.

answered