cancel
Showing results for 
Search instead for 
Did you mean: 

Workdesk Search Template question

mtiwari
Champ in-the-making
Champ in-the-making
I am trying to build a document search which should use one input field from the form but match it to 2 separate properties.
Example- the user enters ID = 123456, I want to return all documents where property 'CaseNumber' = 123456 and 'CaseAspect.CaseNumber' is also equal to 123456 but I don't want the user to enter ID twice on the screen

This is the where clause for 2 separate fields-

<where>
      <or>
         <eq>
            <whereprop editproperty="editable" symname="P:CaseNUmber" />
         </eq>
         <eq>
            <whereprop editproperty="editable" symname="P:CaseAspect.caseNumber" />                               </eq>
      </or>
</where>

I would like to somehow use the first value for the second condition as well. Can we hide the second field and use literals or pass copy paste the first value into the second?
Thanks.
2 REPLIES 2

deko
Star Contributor
Star Contributor
Hi mtiwari,

This functionality is not possible with an OOTB Workdesk. Normally you would either use two search templates (one for each property) or your users would have to enter the value twice if being used in one search template. Literals in a standard search template cannot be filled during runtime, but are there to be filled with a predefined value in the template itself.

As solution for your request, you could try to code a custom field control for the second property field, which is active only in the search context and copies over the value from the first field after every character entered in the first field.

Best regards,
Dennis

mtiwari
Champ in-the-making
Champ in-the-making
Thanks.
I ended up writing a custom search form which copies over the contents from the first field to the other on focus.