Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Sorting problems

  Asked By: Geoffrey    Date: Dec 15    Category: Sharepoint    Views: 666

I am having problems today. Was hoping someone could relieve me from
my agony!

I added a custom field to the Document Profile.
Then I included that custom field in the Category Items Part so it is
displayed.

That all works just fine as I modified the TahoeUtils to include the
field in the Select statements.

I then wanted to take away the Date sort and make it sort by this
Custom field.

The line for the Sort Clicks in the CategoryItemsPart.xsl is:
<A href="javascript:(void 0);" onClick="setSortByAuthor(false);
return false;"><xsl:choose><xsl:when test="/dav:multistatus/Context
[OrderByPropertyUri $ieq$ 'urn:schemas-microsoft-
com:office:office#Author']"><xsl:value-of
select="/dav:multistatus/Strings/String
[@_locID='L_ResultListSortByAuthorLabel_TEXT']"/>

<xsl:choose><xsl:when test="/dav:multistatus/Context
[OrderByIsAscending = '1']"><IMG border="0"
src="SortedAscending.gif"/></xsl:when><xsl:otherwise><IMG border="0"
src="SortedDescending.gif"/></xsl:otherwise></xsl:choose></xsl:when><x
sl:otherwise><xsl:value-of select="/dav:multistatus/Strings/String
[@_locID='L_ResultListSortByAuthorLabel_TEXT']"/></xsl:otherwise></xsl
:choose></A> |
<A href="javascript:(void 0);" onClick="setSortByTitle(false);
return false;"><xsl:choose><xsl:when test="/dav:multistatus/Context
[OrderByPropertyUri $ieq$ 'urn:schemas-microsoft-
com:office:office#Title']"><xsl:value-of
select="/dav:multistatus/Strings/String
[@_locID='L_ResultListSortByTitleLabel_TEXT']"/>

<xsl:choose><xsl:when test="/dav:multistatus/Context
[OrderByIsAscending = '1']"><IMG border="0"
src="SortedAscending.gif"/></xsl:when><xsl:otherwise><IMG border="0"
src="SortedDescending.gif"/></xsl:otherwise></xsl:choose></xsl:when><x
sl:otherwise><xsl:value-of select="/dav:multistatus/Strings/String
[@_locID='L_ResultListSortByTitleLabel_TEXT']"/></xsl:otherwise></xsl:
choose></A> |
<A href="javascript:(void 0);" onClick="setSortBySource(false);
return false;"><xsl:choose><xsl:when test="/dav:multistatus/Context
[OrderByPropertyUri $ieq$ 'urn:schemas-microsoft-
com:office:office#Study Source']"><xsl:value-of
select="/dav:multistatus/Strings/String
[@_locID='L_ResultListSortBySourceLabel_TEXT']"/>

<xsl:choose><xsl:when test="/dav:multistatus/Context
[OrderByIsAscending = '1']"><IMG border="0"
src="SortedAscending.gif"/></xsl:when><xsl:otherwise><IMG border="0"
src="SortedDescending.gif"/></xsl:otherwise></xsl:choose></xsl:when><x
sl:otherwise><xsl:value-of select="/dav:multistatus/Strings/String
[@_locID='L_ResultListSortBySourceLabel_TEXT']"/></xsl:otherwise></xsl
:choose></A>

----
Then in the miscFunction.js I added the Function setSortbySource. In
that function there is a reference to a Global Constant, as there is
for Title, and Author..
g_strSearchSortBySource

I went and added that constant in the TahoeUtils.asp file right next
to the similar line to sort by Title.

However, when I sort by Title it works, but when I click sort
by "SOURCE" I get an error saying that:

Error: 'g_strSearchSortBySource' is undefined

---
Is there another place that I need to add this? another file
somewhere?

Am I missing something?

Please help me before I am bald from pulling my hair out.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Sorting problems Or get search suggestion and latest updates.




Tagged: