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/22/2010 6:34 AM
 
This is the right place, but the logic of the filter statement is wrong. If you add a statement "E" to "A or B or C or D", it is "E and (A or B or C or D)", not "E and A or B or C or D"
 
New Post
2/22/2010 6:56 AM
 

YES, it works, it's elementary logic i forgot to put it into weight. Thanks Stephan. Can I make an additional question?

In my table I also have some integet columns with number. At the bottom of the table I add a row and sum these columns. I use the following code:

          <tr >
            <td>
              Total
            </td>
            <xsl:for-each select="//udt:Fields">
              <xsl:if test="udt:Visible='true' or udt:Visible='True'">
                <td>
                  <b>
                    <xsl:variable name="NameOfValueColumn" select="udt:ValueColumn"/>
                    <xsl:value-of select="sum((.|preceding-sibling::udt:Data)/*[name()=$NameOfValueColumn])" disable-output-escaping="yes"/>
                  </b>
                </td>
              </xsl:if>
            </xsl:for-each>
          </tr> 

The problem now is that it sums all the available rows. How can I sum up only the filtered rows?

 
New Post
2/22/2010 8:23 AM
 
Either add the filter to the udt:Data inside the sum or replace it with the filteredData variable
 
New Post
2/22/2010 10:10 AM
 

FINALLY I figured out the correct syntax! For those who may find the article useful, the syntax is:

<xsl:value-of select="sum((.|preceding-sibling::udt:Data[udt:UserN=//udt:Context/udt:UserName or //udt:Context/udt:UserName='tate' or /udt:UserDefinedTable/udt:Context/udt:IsAdministratorRole = 'true'])/*[name()=$NameOfValueColumn])" disable-output-escaping="yes"/>

The next challange for me is to make the search available only for Admin user. The problem is not only the visablibliy of the control but the removal of filteredData:

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)

Can you pass me hints how to deal with this situation?

 
New Post
2/22/2010 10:44 AM
 

The visablity is solved, add this to row 194:

<xsl:if test ="//udt:Fields[udt:Searchable='true'][/udt:UserDefinedTable/udt:Context/udt:IsAdministratorRole = 'true']">

For the second problem i added a second variable, called filteredData1:

<xsl:variable name="filteredData1" select="udt:Data[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)]" />

And changed filterData to fiterData1 in rows 203 (<xsl:value-of select="count($filteredData1)+1" />), 334  (<xsl:with-param name="maxPages" select="ceiling(count($filteredData1) div $paging)" />)

The thing seems to be working, but i'm not quite sure the things i've done are correct. Stephan, if you see something Wrong! let me know.

the newbie needs some baby hints

 
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