Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Case insensitve string comparison?

  Asked By: Domonique    Date: Jan 16    Category: Sharepoint    Views: 1320

I have an advanced condition on a dataview web part that finds a
field in a library to match the url of the current page displayed.
The condition is:

[substring-after(@ows_FileRef, '#') = substring-after($PageUrl, '/')]

This works just fine while users click around within the
application. However, if they change the case in any part of the
entire URL, the match fails. I cannot find an available function
that will allow me to change the case to lowercase before comparing.
(toLowerCase() is not available).

http://MyServer/MySite/V2/Pages/MyPage.aspx works.
http://MyServer/MySite/v2/Pages/MyPage.aspx fails.

This came up today and it was by chance I noticed the lower-case v.

btw, the only functions and operators available for use include:
-
!=
*
.
..
/
//
@
|
+
<
<=
=
>
>=
ancestor
ancestor-or-self
and
attribute
average
boolean
ceiling
child
comment
concat
contains
count
current
descendant
descendant-or-self
div
dvt_1_automode
dvt_apos
dvt_firstrow
dvt_nextpagedata
dvt_RowCount
dvt_StyleName
element-available
false
FirstRow
floor
following
following-sibling
FormatDate
FormatDateTime
format-number
function-available
generate-id
id
IfHasRights
IfNew
IsEmpty
key
lang
last
LastRow
local-name
Max
Min
mod
name
namespace
namespace-uri
node
normalize-space
not
number
or
PageUrl
parent
position
preceding
preceding-sibling
processing-instruction
Random
round
RowLimit
Rows
self
starts-with
string
string-length
substring
substring-after
substring-before
sum
system-property
text
Today
TodayIso
translate
true
unparsed-entity-uri


If anyone can think of something that would work, I'd really
appreciate it.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Leanne Rios     Answered On: Jan 16

This may be a dumb question, but can you use the ms:string-compare
function? I'm not sure how the namespaces cross over...

 
Didn't find what you were looking for? Find more on Case insensitve string comparison? Or get search suggestion and latest updates.




Tagged: