Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

DAM search predicate - input to uppercase

Avatar

Level 1

What is best way search by uppercase using querymanager.

When  a user enters a lowercase  character in the field on the SiteAdminSearchPanel.js page, we need to search by an uppercase character.

My facet search predicate looks like this:

<code>

C:\wcms_5_5\code\zzzcom-mvn\content\src\jcr_root\apps\dam\content\search\searchpanel\facets\assetsubmitterid.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:Widget"
    fieldLabel="Submitter SAP ID"
    propertyName="jcr:content/metadata/sap:submitter_id"
    customcase.property="jcr:content/metadata/sap:submitter_id"
    customcase.case="no_case"
    xtype="propertypredicate"/>

</code>

The form posting to the standard AssetSearchServlet.java via ajax/jason to run query manager I believe.

I've tried modifying the above predicate using fieldstyle.

3 Replies

Avatar

Level 10

Your use case is to search using an upper case character set- even when the user enters lower case -- can you please clarify? 

Avatar

Level 1

We store the ids in uppercase letters and numbers on the database.

They can enter lower case letters in searchpanel - no sure how to make uppercase before querybuilder runs ?

Avatar

Level 1

I just realized I'm not using customcase, it was my last failed try (sorry).

The predicate is:

<code>

C:\wcms_5_5\code\zzzcom-mvn\content\src\jcr_root\apps\dam\content\search\searchpanel\facets\assetsubmitterid.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:Widget"
    fieldLabel="Submitter SAP ID"
    propertyName="jcr:content/metadata/sap:submitter_id"
    xtype="propertypredicate"/>

</code>