Change Label text at runtime in mobile application

Change Label text at runtime in mobile application

  

Hi

Is there a way to change the label text dynamically at runtime. I have a form in my mobile alllication and based on the user selection, i want to change the Label’s text from “XXXXX” to “YYYYY” or viceversa

thanks,

-Dileep

Hi,

You have a value property attached to the label widget. You have to put the name of one of your variables in the value property.

Regards

Hi Venkata,

To complete Fabien's answer, any widget that makes use of a variable's value will be automatically refreshed if you change the value the variable.

So, assuming you have a Label widget named MyLabel, if you follow Fabien's suggestion, and set it's Value property to be variable MyVariable, as soon as you assign a new value to MyVariable (in your actions), your MyLabel widget it will be refreshed to display the new value.

Hi Jorge,


Is this possible in Mobile Application?


Thanks,

_Navaneethan

Hi Navaneethan,

Yes, this behaviour is exactly how Mobile Apps in OutSystems work.

Hi Jorge,


This is for WEB application, here for Value we can assign Variable in VALUE

 


and this is for MOBILE 

where i have to assign variable?


Thanks,

_Navaneethan

Solution

Hi Navaneethan,

You are correct, Labels in mobile don't have the Value property. But on the other hand, you can have an Expression inside your Label - and an Expression does have the Value property, with the behaviour I described. See the screenshot below:

Hope this helps clarify.

Solution

Thank you all for your replies. Yeah i figured out expression is the only way to achieve this in Mobile application.


Regards,

-Dileep


Jorge Martins wrote:

Hi Navaneethan,

You are correct, Labels in mobile don't have the Value property. But on the other hand, you can have an Expression inside your Label - and an Expression does have the Value property, with the behaviour I described. See the screenshot below:

Hope this helps clarify.


Hi Jorge,


Thanks for reply. I got what you told