How to Define Low_Char & Hi_Char

shorty545

New Member
I am trying to define a search field that will search From: a location To: a location. Currently if the user defines what locations to search in, it will work fine. However if the user leaves the fields blank, suggesting that he wants to search all the data in all the fields available it will not do so. I believe the fix is setting the From: field to default to Low_Char if an empty string is entered, and the To: field to Hi_Char if an empty string is entered. However I can not find out how to define Low_Char and Hi_Char in order to do this. I have seen similar things in other programs but I believe they are defined in an included program that I don't know of. Any help would be appreciated.
 
shorty545 said:
I am trying to define a search field that will search From: a location To: a location. Currently if the user defines what locations to search in, it will work fine. However if the user leaves the fields blank, suggesting that he wants to search all the data in all the fields available it will not do so. I believe the fix is setting the From: field to default to Low_Char if an empty string is entered, and the To: field to Hi_Char if an empty string is entered. However I can not find out how to define Low_Char and Hi_Char in order to do this. I have seen similar things in other programs but I believe they are defined in an included program that I don't know of. Any help would be appreciated.
low_char is an empty string and is not defined in MFG/PRO. The others are defined in mfdeclre.i and initialized as follows

hi_char = chr(1).
do i = 2 to 255:
if chr(i) > hi_char then
assign hi_char = chr(i).
end.
assign
hi_date = 12/31/3999
low_date = 01/01/1900.
 
Hi,

I think what you need is:

use:
{mfdtitle.i "A"} or {mfdeclre.i} in the start of your program.

{mfdtitle.i "A"} - should be placed in the program if you want qad std head.
- {mfdeclre.i} is called from within {mfdtitle.i}

{mfdeclre.i} - defines lots of std. MFG variables incl. hi_char, low_date, hi_date, but also other interesting like: global_userid, mfg_userid, global_part, ...

Regards

Ole
 
Back
Top