Fetch and parse text from a text widget

Fetch and parse text from a text widget


Hello there Outsystems.
I'm new in this technology so there are multiple problems and complications that do affect me.

I was trying to parse a string and send those values into a different variables or labels (or any place where I could save them.
For example..

I have a text widget with this value: "I110518"
What I want to do is to indentify the first letter, which in case it was an "I", It would write a specific text into a specific label/input.
I would like to get the first 2 numbers after that letter and put them in another label that are a "day"
The other 2 for a month, and the last 2 for year.

The problem is, not only I'm unable to get the value inside the text widget, but as well I don't understand how the regex works in the outsystems environment and how can export those results to the labels that I want.

I'm aware that I'm asking too much, but I'm in here stuck for hours looking for solutions which I'm not being able to find them (or basically I'm simply not smart enough)

Any help would be amazing.

Hi Pedro,

By text widget you mean an input with a variable associated?

Regarding the regex please check this post, but for your case you can use substring to get the values.

Hope this help.

Hi Pedro,

First of all, if you haven't done so yet, I strongly recommend you to follow the online courses to get a good grasp of the basics of Outsystems. Otherwise, you will constantly get stuck trying to accomplish simple things like the one you have described.

Now, on to your question: I'm attaching a sample .oml showing one possible way to accomplish what you want. It should be enough to put you on the right track.