SmithRow
Scholar

How to populate List View using an item view field (K2 Designer)

Jump to solution

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.

Labels: (1)
0 Kudos
Reply
5 Replies
tbyrne777
Contributor

Re: How to populate List View using an item view field (K2 Designer)

Jump to solution
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.
Reply
paulk
Scout

Re: How to populate List View using an item view field (K2 Designer)

Jump to solution

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?

Reply
SmithRow
Scholar

Re: How to populate List View using an item view field (K2 Designer)

Jump to solution
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.
0 Kudos
Reply
SmithRow
Scholar

Re: How to populate List View using an item view field (K2 Designer)

Jump to solution
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
0 Kudos
Reply
paulk
Scout

Re: How to populate List View using an item view field (K2 Designer)

Jump to solution

I see.

 

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

 

Cheers

0 Kudos
Reply