How to get Constant in Jsaction

0
Hi, I want to make a jsaction component, So I don't want to pass this constant as an argument. Is there any way to get this constant directly from jsaction? I tried the API of Mendix ‘mx’ series, but I didn't find any applicable. thinks.
asked
1 answers
1

There may be a better way to do this, but I’ve used mx.session.getConstants() to get all the constants that have been exposed to the client.

You can then filter to find the name of the constant you are interested in, pass this into map to get the value, and optionally pass into reduce to apply a default value if necessary.

answered