Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsCustom Date RangeCustom Date Range
Previous
 
Next
New Post
3/19/2012 11:45 AM
 
Bear in mind EventsGetByRange is used all over the place, sop anything you do will affect thing like Search, SiteMap, Month, List, Day view, etc. So would recommend it for a module which is very limited in scope, preferably list view display only.


DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
5/1/2012 12:52 PM
 
So i've sort of been trying to work through this and am stuck.

Is there a way I can conditionalize this?

Basically:

IF
E.ModuleId = '618'
THEN select date between '2012-01-01' AND '2012-12-31'
ELSE run it as written

Can anyone help me out here?
 
New Post
5/1/2012 1:22 PM
 

Have a look at the EventsSave sproc on how to do IF statements in sprocs. If it was me I wouldn't change the queries I would override the input values near the start of the sproc. So:

IF @ModuleIDs = N'618'
 Select @BeginDate = startdate'

Not sure if you can put two nested statements under the IF. If not just do the same but with @EndDate as well. The thing I'm not sure about is the structure of the hard coded date. I think it has a # in it somewhere, so you may have to do some google searching.

If you always want it to be for current year, you could always construct the date by using the current year. Datepart is the relevant SQL command to get the year component Datepart(year, GetUTCDate()) - http://msdn.microsoft.com/en-us/libra...

Cheers
Roger


DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
5/1/2012 3:23 PM
 

Hi Roger,

 Thanks for the reply, so i'm not really a SQL SERVER\ASP guy at all so all of this is a little outside my specialty.

 I have a couple of questions:

@ModuleID - if I declare this at the top is the corresponding value automatically pulled into the query or does it need to be fed in from the application.  I guess my question is if I run this query on an event page where the moduleID is 618 will @ModuleID = 618 or does something else have to happen.

 Does my question make sense at all?

 UPDATE: I've decided to take this over to the SQL forum I think it fits better there now.

 
New Post
5/1/2012 4:30 PM
 
You don't need to declare moduleid, @moduleids is already declared as an input parameter. Note the 's' on the end and the fact it is a string. This is because if your module has sub-calendars these will be included in the string comma separated.

Yes on aage where the moduleid is 618, moduleids will be the string value 618.

DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsCustom Date RangeCustom Date Range


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out