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.
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
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.
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
Can you share your OML so I can take a look?
Please identify the screen and icon associated.
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.
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
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.
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
Note you can also use CSS to display an ellipsis, instead of using SubStr(). See e.g. here for an example.
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