Fetch value from a label

Fetch value from a label

  

Hi there Outsystems community

I'm new in the outsytems development and I have some academic experience in multiple languages like Java, C# etc..

My main issues is that I have a label/text widget with a pre-defined value, for example: "I110518"
All I want to do, is to compare if the first letter "I", if so, I would write a specific "string" on a label.

The numbers 11 I would like to send them to a label called "day"
The Numbers 05 I would like to send them to a label called "month" and the numbers 18 I would like to send them to the Year"

How can I effectilly do that, I can't get the value from the label/text widget, so I can't even proceed to separate the entire label into small pieces.

I would be very happy if somebody could give a hand in this, since I've been stuck in this for a long period.
Best regards..

Solution

Hi,

First, congratulations on joining us,

Second, you have a widget called "expression" and in the expression you can do whatever you want, from using functions well with calculations among other things, from the one explored there.

In case of doubt, pm

Solution

Pedro,

Welcome to Outsystems. 

My advice to you is to do the online courses, if you haven't done them yet, since they explain most of concepts used here.

To extract the letter from your label/text widget you can use the function "substr()" in the if condition.


Abílio Matos

Thiago Mari wrote:

Hi,

First, congratulations on joining us,

Second, you have a widget called "expression" and in the expression you can do whatever you want, from using functions well with calculations among other things, from the one explored there.

In case of doubt, pm

Many thanks, it worked so far, If I have any doubt I will send you a PM.
Best regards..