402
Views
8
Comments
Solved
Change Label text at runtime in mobile application
Question

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

2019-09-24 18-41-25
Jorge Martins
 
MVP
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.

2020-12-24 13-17-14
Navaneethan M

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

2018-02-15 07-47-32
Fabien BURLOT

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

2019-09-24 18-41-25
Jorge Martins
 
MVP

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.

2020-12-24 13-17-14
Navaneethan M

Hi Jorge,


Is this possible in Mobile Application?


Thanks,

_Navaneethan

2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi Navaneethan,

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

2020-12-24 13-17-14
Navaneethan M

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

2019-09-24 18-41-25
Jorge Martins
 
MVP
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.

2020-12-24 13-17-14
Navaneethan M

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

UserImage.jpg
Dileep Rajam

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


Regards,

-Dileep


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.