Text lenght in listview

I have gotten a project for school called " Notifications " I need to recieve notifications from google sheet to mit ai2 companion app and when you click on any notification in listview it opens screen2 on which you see full text of notification and can mark you read the notification and Unread notification number goes from 2 to 1 (which I still didn't figure out how to do) but main thing I need to ask is how do I limit the number of words in list view?
lets say if in notification there is 10 words I wanna see only 5 words in screen1 and when I click that notification on screen2 I see full message.
any Ideas?

Thanks.


Just try like this,
image

Here i have taken only col A only in list view

image

1 Like

thanks it helped but may I know is there way I can only define how many words in listview there can be?.
this code only limits how many letters there will be in the text part of listview.


this is not my picture but this is how it should look.

1 Like

I got it ty. last question how do I see examples like the one you marked
image

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

thanks :slight_smile: .

Run the long text through a SPLIT AT SPACES text block to get a list of the words.

To get text with just the first 5 words from the list, code:

set first5 = ''
for n = 1 to 5
  set first5 to JOIN(first5, ' ', select item n from list_of_words)
end for n

Use the blue mutator button to add an extra socket to the JOIN block.

2 Likes