Hi there,
You can probably do it with a list view out of the box but as you say it may be easier to take the first date as an input to a stored procedure and then generate the 5 rows for the list view and load the list view with those rows populated for the date but not the rest of the information.
That would be the most flexible - however if it is always going to be just 5 dates then you could indeed use an item view - something like this:
Then pass through the start date as a parameter to it:
Then have a set of expressions to calculate the days for the data labels:
And then save those values back, along with the inputs from the text boxes:
Cheers
This will probably be easier to do using a single item view than with an item view and a list view.
- Create the item view with all the controls you need as per the “View layout” screenshot
- For each of the generated date controls, create an expression using the “Add Days” function that takes the date you select in the calendar control and add the necessary number of days. See the “Expression” screenshot
- Set the Format for each of the generated date controls to the date format you want. See “Set date format” screenshot.
- This will then generate the 5 consecutive dates you need. See “Working view” screenshot
- Use expressions to calculate the total working days for the week etc.
Paul, thank you very much. I'm quite grateful; I'd been trying for a long time, studying for a solution, so this means a lot to me. It works perfectly.
I decided to proceed with this, thank you so much, I had been hesitant about forums because I was afraid of being judged for asking what some would consider "dumb questions" or being part of a negative group, but the speed of the replies and advice meant a lot to me because I am new to k2. Thank you one again.