40
Views
10
Comments
Solved
Preview of a large message in a table
Question
Application Type
Reactive

Hello,

I have a table with plenty of values. One of them is a text message with 2000 characters. Can I preview somehow the first 50 so the table looks better and then be able to see and handle the whole message? (something like a popup). 

Thank you in advance.

2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Vasilis,

Can you try like this and check if it's working properly?

I'm attaching OML version as a reference.


Kind regards,

Rui Barradas

ThirdPartyEVU.oml
2020-05-07 18-53-00
Rui Barradas
 
MVP

Hello Vasilis,

Hope you're doing well.

You can indeed. One way to do this is to use the Substr Built-In Function.

With this, you can easily create an expression and control how many characters you want to preview in your screen. You can also concatenate with "..." at the to give the idea that the message is not over. Something like this:

Substr(YourMessage, 0, 50) + "..."


Then you can have something like an informative icon in your screen, when the user clicks on it, you open a popup and show the full message.


Kind regards,

Rui Barradas

2024-05-17 07-53-09
Vasilis Roumeliotis

Hello Mr. Barradas,


Thank you for the answer. I need more help on the second part of the problem. As you said the user can click on an icon an get the whole message. I have trouble mapping the correct message to the correct record. I have seen the case where you can map an external entity to the one in question, but I cannot seem to get it right when it comes to assigning the correct message to the correct record when it comes from the same database. When I click on the icon I always get the 1st message of the table, even though I am clicking to another record. 

Vasilis

2020-05-07 18-53-00
Rui Barradas
 
MVP

Can you share your OML so I can take a look?

Please identify the screen and icon associated.


Kind regards,

Rui Barradas

2024-05-17 07-53-09
Vasilis Roumeliotis

Sure. In the home screen  3rdPartyEVU, in table ARCHIVE, under the column LP04 Message when I click the " i " icon, it always shows the 1st record.

Thank you for your time.

ThirdPartyEVU.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi @Vasilis Roumeliotis ,

you have now an expression in the popup referring to the 'current' value in the aggregate, this gets evaluated on refresh of the aggregate, and the 'current' at that point is the first.

So I would add a separate local variable 'popupmessage', refer to that one in my popup expression, and in the LinkOnClick, set it to the current of the aggregate.  In that action (LinkOnClick), as it is triggered by an icon inside the table, the 'current' refers to the clicked row.


Dorine

2024-05-17 07-53-09
Vasilis Roumeliotis

Hello Dorine,

How can I "connect" the local variable to the link though? I have done it as you show in your screenshot but still always get the 1st value  of the records.
PS: Thank you @Kilian Hekhuis and @Adeeb Alam for your alternatives.

Vasilis

2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Vasilis,

Can you try like this and check if it's working properly?

I'm attaching OML version as a reference.


Kind regards,

Rui Barradas

ThirdPartyEVU.oml
2024-05-17 07-53-09
Vasilis Roumeliotis

I am a fool. I had not changed the variable in my popup window. It's been a long day creating this app...

Thank you all @Kilian Hekhuis, @Dorine Boudry  and @Adeeb Alam for your contribution. 
I really appreciate it.

Have a nice day!

Vasilis

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Note you can also use CSS to display an ellipsis, instead of using SubStr(). See e.g. here for an example.

2023-03-24 10-43-07
Adeeb Alam

Hii Vasillis,

In outsystems we are having textellipsis function which is very easy to use 

And you can refer to this post to get detailed information about this.

https://www.outsystems.com/forums/discussion/79778/handling-very-long-text-being-display-in-table/

Regards,

Adeeb Alam

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