Author Topic: Cognos Connection: "Search" (default to "Name or Description")  (Read 5777 times)

Offline david.stachon

  • Community Leader
  • *****
  • Join Date: Dec 2008
  • Posts: 196
  • Forum Citizenship: +9/-0
Does anyone know if it's possible to change the "Search" in Cognos Connection to default to searching for: "Name or Description" as opposed to "Name Field". (some users aren't clever enough to change it on there own)

...this is 8.2.

cheers,
david.

Offline prakashraju987

  • Full Member
  • ***
  • Join Date: Sep 2008
  • Posts: 8
  • Forum Citizenship: +0/-0
Re: Cognos Connection: "Search" (default to "Name or Description")
« Reply #1 on: 13 Apr 2009 06:53:09 am »
This is possible in cognos 8.4.there Direct option is available.

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,738
  • Forum Citizenship: +256/-1
    • Paul's Cognos Blog
Re: Cognos Connection: "Search" (default to "Name or Description")
« Reply #2 on: 16 Apr 2009 08:15:10 am »
You can do this by modifying the internals. I'm using 8.4, but I have no reason to think the 8.2 version will be much different.


open ..\c8\templates\ps\logicsheets\presentation\main\search.xsl

look for this section:

      <out:variable name="field">
         <out:variable name="f" select="string(key('env-param','sfield'))"/>
         <out:choose>
            <out:when test="$singleField != ''"><out:value-of select="$singleField"/></out:when>
            <out:when test="($f = 'k' or $f = '')">
               <out:choose>
                  <out:when test="$indexSearch='true' and $userCanUseIndexSearch">
                     <out:value-of select="'k'"/>
                  </out:when>
                  <out:otherwise>
                     <out:value-of select="'n'"/>
                  </out:otherwise>
               </out:choose>
            </out:when>
            <out:otherwise>
               <out:value-of select="$f"/>
            </out:otherwise>
         </out:choose>
      </out:variable>

change the <out:value-of select="'n'"/> to <out:value-of select="'nd'"/>
Note, single quote inside double quote.

n is for Name
d is for Description
and nd is for Name and Description

I cannot stress enough the importance of backing up any internal file before modifying it! A single misplaced comma will often be enough to prevent Cognos from loading.

Offline david.stachon

  • Community Leader
  • *****
  • Join Date: Dec 2008
  • Posts: 196
  • Forum Citizenship: +9/-0
Re: Cognos Connection: "Search" (default to "Name or Description")
« Reply #3 on: 25 Apr 2009 06:20:07 pm »
ah brilliant. thanks for that.

Offline afzaki7

  • Full Member
  • ***
  • Join Date: Dec 2015
  • Posts: 30
  • Forum Citizenship: +0/-0
Re: Cognos Connection: "Search" (default to "Name or Description")
« Reply #4 on: 28 Apr 2016 03:32:08 am »
is that work for cognos 10.2 ? because there is a Full text and all fields option
what i really want is to set the Name field option as the default selection instead of  Full text and all fields option
" إِذَا مَاتَ ابْنُ آدَمَ انْقَطَعَ عَمَلُهُ إِلا مِنْ ثَلاثٍ : مِنْ صَدَقَةٍ جَارِيَةٍ ، أَوْ عِلْمٍ يُنْتَفَعُ بِهِ ، أَوْ وَلَدٍ صَالِحٍ يَدْعُو لَهُ "

Offline CogYess

  • Associate
  • **
  • Join Date: Dec 2018
  • Posts: 1
  • Forum Citizenship: +0/-0
Re: Cognos Connection: "Search" (default to "Name or Description")
« Reply #5 on: 06 Dec 2018 12:47:02 am »
This doesn't seem to work for Cognos 10.2 , anyone any idea how to change the Default Search to "Name or Description" in Cognos 10.2 ?

 


       
Twittear