Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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 ForumsForm and ListForm and ListFilter UDT my Month comparisonFilter UDT my Month comparison
Previous
 
Next
New Post
9/8/2007 1:34 AM
 

I created a UDT that has a field call Month. I also created a copy of the module on a different page. I would like to filter the displayed records to only show records where month is set to the current month. My Rendering Method is a User Defined XSL Transformation.
Any suggestions would help.

Thanks
Jason Redeker

 
New Post
9/8/2007 6:06 AM
 

That is not easy, but possible. XSL doesn't include any date time functions, they are treated as strings, they look like 2005-12-31T23:59:55.0000000+01:00. You will have a chance if your month colum is a string with length 2 with content like "01", "02".

<xsl:variable name="currentMonth" select="substring( /udt:UserDefinedTable/udt:Context/udt:Now, 6, 2)" />

...

<xsl:foreach select="/udt:UserDefinedTable/udt:Data[udt:Month=$currentMonth]>

 

 

 
New Post
9/8/2007 10:23 PM
 

thats perfect thanks

 
New Post
9/10/2007 3:46 PM
 

here is what i came up with 
My filed in the table was a text filed with the name of the month so i did the following

<xsl:variable name="monthnum" select="substring( /udt:UserDefinedTable/udt:Context/udt:Now, 6, 2)" />
     <xsl:variable name="currentMonth">
       <xsl:choose>
         <xsl:when test='$monthnum=01'>January</xsl:when>
         <xsl:when test='$monthnum=02'>February</xsl:when>
         <xsl:when test='$monthnum=03'>March</xsl:when>
         <xsl:when test='$monthnum=04'>April</xsl:when>
         <xsl:when test='$monthnum=05'>May</xsl:when>
         <xsl:when test='$monthnum=06'>June</xsl:when>
         <xsl:when test='$monthnum=07'>July</xsl:when>
         <xsl:when test='$monthnum=08'>August</xsl:when>
         <xsl:when test='$monthnum=09'>September</xsl:when>
         <xsl:when test='$monthnum=10'>October</xsl:when>
         <xsl:when test='$monthnum=11'>November</xsl:when>
         <xsl:when test='$monthnum=12'>December</xsl:when>
         <xsl:otherwise>none</xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
    
  <xsl:foreach select="/udt:UserDefinedTable/udt:Data[udt:Month=$currentMonth]>

Thanks for your help

 
New Post
9/18/2007 3:02 AM
 

Hi There

I'm after something similar, I need to sort my records by first letter - exactly the same as the DNN user a-z listing, how would i accomplish this? also how would I build the a-z heading list so that it posts back the appropriate letter, and also how do i default it to A when the user first views the page?

Thanks

Mike

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListFilter UDT my Month comparisonFilter UDT my Month comparison


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