How to use constant as text shown in the page

0
Hello Community, I have defined a constant called “a” and I want it to be shown on the page. I have tried to use @ModuleName.ConstantName but it directly shows the text “@ModuleName.ConstantName” in the page. Could anyone suggest what I should do? Best
asked
2 answers
1

You should be able to do it, in mendix 8 and 9. 

 

Don’t forget to put your constant with expose to client to yes.

answered
0

Hi, 

it is not possible to directly use constants in text. As you can see here: https://docs.mendix.com/refguide7/constants.

You might be able to 'hack it’ by creating some sort of nonpersistent helperentity with a string attribute which contains the text you want to show. This string can be filled in a microflow, a datasource microflow for example, with the constant value.

 

answered