Grouped list in Phone app

Grouped list in Phone app

  

Hi I am new to this platform and need some help. I am working on an app that will show a list of tasks that need to be completed each day and the user will mark then as done throughout the day. I want to be able to display the list of open tasks, but grouped by day, so instead of looking like this:

I want them to look like this:

Thanks for the help

Hi Gonzalo,

First of all, welcome to the OutSystems community :)

To answer your question:

(I'm assuming you know how to get all the tasks for each single day, If I'm wrong please tell)

- To format the text display value, you can use the built-in function "FormatDateTime"

- To display the task as you show in that image, add a List widget (the source for the List are the list of all tasks for that day), an expression to that List and set the expression's value to this (adapt to your list names):

GetTasks.List.Current.Hour + " - " + GetTasks.List.Current.Description


Does it help you?

Thanks so much for the prompt respond. Your recommendation did help concatenate the time and message, but I still can't group the tasks for a day under the date heading. The image below shows what I am getting. AS you can see I have to items in the list with the date "18 Apr 2017" and 2 items with the date "19 Apr 2017" I would like to have the date once and the two items listed below.as in the second attached picture.

I need the screen to look like this: One date, all tasks for that date grouped underneath. Then, the next dates and its tasks and so on.

 Thanks again

A possible solution for what you want to achieve is to use a UI element that you want to instantiate for each existent day, i.e. you can use a block.

Possible steps:

  1. Create a block and add a date as input to the block where you will pass a day. In the block, you fetch the tasks only for that day (use an aggregate for that). Implement the block as I've told you above
  2. Back to the screen, Add a List to it and add as source the days for which you have tasks (use an aggregate and don't forget to Group by the date of the day to avoid duplicates)
  3. Drag the block created to the List and to the input pass the day.

First: thanks so much for your responses, they help a lot. I tried your procedure. I think I followed it correctly, but I get this.

This is what my app properties look like:

It looks great! Congratulations! 

Don't forget to add a List to the block to show the tasks for the day. Then share a screen where dates have tasks.

António,


That's the problem. I do have tasks to list but they are not showing for some reason. I added a list to the screen, in it I added the day from a grouped aggregate. Then inside the list item (under the daydate) I added another list to add the tasks details. I added the block which has a GetTasksDetails aggregate. But I get an error that says it needs a source. In the source dropdown box, I don't get the option to select  "GetTaskDetails" aggregate.

I got it to work. To list the tasks under the, but instead of listing just the tasks for that date, it list all the tasks. Then it shows the next date and all the tasks again. As if the block is not using the input parameter to filter the results. How do I force the Get in the block to use the Input parameter?


Thanks,

Solution

wait, wait, wait ... I figure it out. I needed to ad a filter to the get with a condition TaskDate = "BlockInput".


Thanks again

Solution

Hi Gonzalo,

I couldn't answer your post before but that is great that you had figured out how to do it by yourself!

Don't forget to mark this thread as solved!


Regards,

António Pereira