Popup InfoBalloon opens when I have more than 30 characters

Popup InfoBalloon opens when I have more than 30 characters

  

Hi,

Suppose I have a table with 5 columns. In the second column I need a lot of text. So the idea is when the attribute has more than 30 characters, open a popup with the rest of the text. Is it possible to do that? Do you have another solution?

Best regards

Hi Jose,

I think the easiest solution is just to wrap that field in an if-statement. If the length of the text is shorter than 30 characters, just show the text in the 'True' part of the IF. If the length is more, only show the first 30 characters with '...' behind it in the false and add the popup infoballoon with the full text to open when the user hovers the text with the mouse pointer.

Regards,
Lennart

Hi José,

You can also use a Tooltip if you're using SilkUi and apply the same solution that Lennart said.

Regards,
Samuel

Hi,

Thanks for the answers Lennart and Samuel. 

This is if-statement is correct?

Regards
José

Hi José,

You need to use the function Length to calculate the number of characters in the text.


Regards,
Samuel

Hi José,


Look to what Samuel did. You are writing an If statement inside an If. You don't need that, write just the condition (like Samuel did).


Regards,

Ricardo

Nice Samuel

I put this and is working

If(Length(IllnessTable.List.Current.Description)<=30,True or (Length(IllnessTable.List.Current.Description)>30), False) 

When it is false, the tooltip appears but how can I only show the first 30 characters with '...' behind?

Regards
José


Hi again José,

You can do that with the function Substr, like this:

If(Length(TaskTable.List.Current.JobTask.Note) >= 30,
Substr(TaskTable.List.Current.JobTask.Note,0,30) + "...",
TaskTable.List.Current.JobTask.Note
)

Regards,
Samuel

Sorry but I don´t understand Samuel.

I need create one second if-statement or I change my if-statement to:

If(Length(IllnessTable.List.Current.Description)>= 30, Substr(IllnessTable.List.Current.Description,0,30) + "...", IllnessTable.List.Current.Description)

Is that correct? Because I have a error in the sintaxe

Regards,

José

Jose Reigado wrote:

Sorry but I don´t understand Samuel.

I need create one second if-statement or I change my if-statement to:

If(Length(IllnessTable.List.Current.Description)>= 30, Substr(IllnessTable.List.Current.Description,0,30) + "...", IllnessTable.List.Current.Description)

Is that correct? Because I have a error in the sintaxe

Regards,

José

Hi Jose,

Check your syntax once. Thats why it must be showing error 'text' datatype required instead of description.

Table.list.current.entityname.attributename 

This is the right one.


Hope this helps for you!!!

Thanks

Solution

Hi Jose,

Why don't you just use an If-Widget in the TableRecords cell? The you will get something like this (I used an entity called Color and a max length of 10 characters to create the example):

In the condition you can put: 

And in the 'True' part, you can put something like:


Solution

Thanks Lennart,

Problem solved.

Best regards
José