| |
 |
Hotline Question of the Month |
| by Margaret Jeronim |
|
| |
Question: I just downloaded an update that allows an advanced search in Servlet Multiple Record Retrieval.
How do I use it?
|
Answer:
When you generate Servlet application in mrc the HTML source file is placed on your IFS in the following location:
/mrcjava/WEB-INF/classes/Data Dictionary/IXXXXXs.html where
"Data Dictionary" is the name of your data dictionary where you've created your application
"IXXXXXs.html" is your application number.
Select your application and place 2-Edit next to it. Look for the following statement:
advancedSearch = "1" //0-true,otherwise-false
In order to turn on the advanced search you will need to change "1" to "0" and save your change by pressing F2 - Save. Your changed statement should look like this:
advancedSearch = "0" //0-true,otherwise-false
Refresh your browser to see the change. (See Figure 1 - Servlet Multiple Record retrieval with advanced search option turned on)
Figure 1 (Click to enlarge)

You notice that each field has an option to select a relation and input box for the value. This allows record display based on precise specification. As you can see, all relations are in standard abbreviation form (EQ, GE, GT, etc).
If you want users to be able to see the descriptions (Equal to instead of EQ) you can specify it in your HTML code. NOTE: Alphanumeric fields will have more options available than numeric fields (such as starting with, contains, and using wild chars * or ?).
Look for the field that you want the description to display (this example will show you haw to do it on alphanumeric field Customer Name - CNAME is the field name). It will be placed between tags as a part of your table headings:
<TH ALIGN="center" NOWRAP>
<SCRIPT> setOptionSelect("CNAME ", "F_F_RI_CNAME ",1,false)</SCRIPT>
<INPUT TYPE="text" SIZE=6 NAME=val_CNAME value="F_F_VI_CNAME ">
<TH>
Change false to true, save your change (press F2) and refresh your browser (See Figure 2 for view from the browser). Your statement should look like this:
<TH ALIGN="center" NOWRAP>
<SCRIPT> setOptionSelect("CNAME ", "F_F_RI_CNAME ",1,true)</SCRIPT>
<INPUT TYPE="text" SIZE=6 NAME=val_CNAME value="F_F_VI_CNAME ">
</TH>
Figure 2 Display of descriptions for relation codes.

In order to non-display advanced search option for any of the desired fields you can use <!-- --> tags.
Find the field that you don't want to display it (last field in this example). (See Figure 3 to view the changes)
<TH ALIGN="center" NOWRAP>
<!-- <SCRIPT> setOptionSelect("VB_005 ", "F_F_RI_VB_005 ",0,false)</SCRIPT> -->
<!-- <INPUT TYPE="text" SIZE=6 NAME=val_VB_005 value="F_F_VI_VB_005 "> -->
</TH>
Figure 3 Non-displayed last field search option.

Have a hotline question of your own? Send an e-mail to support@mrc-productivity.com and let our product specialists help you!
|
|
 |
 |
 |
 |
mrc publishes this newsletter on a monthly basis. Subscription is free of charge. Please send any questions or comments about this newsletter to news@mrc-productivity.com. This newsletter is edited by Heather Gately.
To unsubscribe, please just reply to this e-mail with Unsubscribe in the subject line.
View our privacy promise.
|
 |
|