Skip to main content

Good Day 

 

I have an item view that has a date selection to it and once a day of the week as been selected a list view must open with already the next 5 days populated to it.

 

would anyone have any know how on how to do this?

I know how to open a subview just not how to populate it with the 5 days required.

Do you currently have a SQL database behind these views? The easiest way to do this would be to invoke a stored procedure with the date selection and have it create the five rows for you in a table, then your list view can just use that table as its data source.

Is this part of some exam or training as this is the third time this exact question has been asked in the last couple of months?


Yes, Paul. It is a component of training in which the requirements for this specific task kept changng on a regular basis. I apologize for the repetition, but they required that I do this for all types of views.
I had assumed that i could do this by using a stored procedure but held on the assumption that it could be dont using one of the k2 rules.

I have already created a procedure which i hope helps:

CREATE procedure spDateMessing(@d as date)
as
with cte as
(
select n from (values(0),(1),(2),(3),(4)) as t(n)
)
select n,cast(DATEADD(D,n,@d) as date) as Date_ from cte

I see.



 



I just meant I hoped that we weren't giving out the answers to some training / exam module 🙂



 



Cheers


Reply