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 ListXSL, UTD filter by usersXSL, UTD filter by users
Previous
 
Next
New Post
2/21/2010 8:53 PM
 

Hello,

I spent 8 hours fighting with XSL and UTD and please help me:

I have 2 Columns:

Column 1: UserN - Text DataType - usernames of registered users

Column 2: Fruit - Text DataType - fruit names - "banana", "apple", etc.

I also have an Security Role called "People1"

When a registered user with a role "People1" enters a page with my UTD  I want to see only the fruites (Column 2) which correspond in Column 1 to his username.

I want to use User Defined XSL because I do some other custom stuff with the XSL file. I copied, changed and now I use my own version of AdvancedTable.xsl. The only thing i can't achieve is filter users by login. I read 3-4 topics in the forums about UTD, XSL and tried to use the code, but I couldn't, i tried to read the manual of UTD, i really can't deal with this XSL stuff yet :(. Can you please help me Thanx in advance.DM

 

 
New Post
2/22/2010 2:05 AM
 

The filter  statment in your XSLT script should look like udt:Data[udt:UserN=//udt:Context/udt:UserName]

 
New Post
2/22/2010 4:56 AM
 

Stefan, can you tell me where exactly in the document should I use the filter:

It's still not filtering, in AdvancedTable1.xsl i put it around 290 row:

                <xsl:for-each select="//udt:Fields">
                  <xsl:if test="udt:Visible='true' or udt:Visible='True'">
                    <xsl:choose>
                      <xsl:when test="udt:Data[udt:UserN=//udt:Context/udt:UserName]">
                    <td>
                      <xsl:variable name="NameOfValueColumn" select="udt:ValueColumn" />
                      <xsl:value-of select="//udt:Data[udt:UserDefinedRowId=$id]/*[name()=$NameOfValueColumn]" disable-output-escaping="yes" />
                    </td>
                      </xsl:when>
                    </xsl:choose>

                  </xsl:if>
                </xsl:for-each>
               

 

 
New Post
2/22/2010 5:16 AM
 
Wrong place. You should set the variable FilteredData instead.
 
New Post
2/22/2010 5:57 AM
 

Hi Stephan,

Thanks for helping me :) I deleted the addings in my previous post. I went to line 183 and change the xsl:variable with adding your code:

        <xsl:variable name="filteredData" select="udt:Data[udt:UserN=//udt:Context/udt:UserName and contains(*[name()=$searchColumns][1],$search) or contains(*[name()=$searchColumns][2],$search) or contains(*[name()=$searchColumns][3],$search) or contains(*[name()=$searchColumns][4],$search) or contains(*[name()=$searchColumns][5],$search)or contains(*[name()=$searchColumns][6],$search)or contains(*[name()=$searchColumns][7],$search)or contains(*[name()=$searchColumns][8],$search)or contains(*[name()=$searchColumns][9],$search)or contains(*[name()=$searchColumns][10],$search)]" />

Still the thing is not workin' :( Is it possible for your to open AdvancedTable.xsl and let me know which row and how to change it. I know i'm close, but close sometimes means a lot, you know ..

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListXSL, UTD filter by usersXSL, UTD filter by users


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