set scope

set scope

Postby Ehab Samir Aziz » Wed Apr 12, 2006 6:07 pm

Please send english samples of set scope to my gmail.
This my scope : set filter to &(cfilter)


Code: Select all  Expand view  RUN
a_fields[1]:="4->me_mc_serl"
a_fields[2]:="4->me_mc_brn"


a_vars[1]:=V_me_SERIAL
a_vars[2]:=V_mc_brn


cValue := ""
cFilter := ""

For i := 1 to 2

     IF Empty(a_Vars[i])     && Don't process empty variables
         LOOP
     ENDIF

     DO CASE            && Create char value
         CASE (VALTYPE(a_vars[i]) == "D" .and. a_vars[i]==V_me_START_D);
         .or. (VALTYPE(a_vars[i]) == "D" .and. a_vars[i]==V_me_in_d)
                 cValue := 'DTOS(' + a_Fields[i] + ') == "' + DTOS(a_Vars[i]) + '"'
         CASE VALTYPE(a_vars[i]) == "D" .AND. i==5
                 cValue := 'DTOS(' + a_Fields[i] + ') >= "' + DTOS(a_Vars[i]) + '"'
         CASE VALTYPE(a_vars[i]) == "D" .AND. i==6
                 cValue := 'DTOS(' + a_Fields[i] + ') <= "' + DTOS(a_Vars[i]) + '"'

         CASE VALTYPE(a_vars[i]) == "N"
             cValue := 'STR(' + a_Fields[i] + ') == "' + STR(a_vars[i]) + '"'       && or
* some other NUM->Chr conversion
         CASE VALTYPE(a_vars[i]) == "C"
             cValue :="alltrim(upper("+ a_Fields[i]+"))" + '=="' + alltrim(upper(a_Vars[i])) + '"'
     ENDCASE
     IF Empty(cFilter)     && this is the first element
         cFilter :=  cValue
     ELSE
         cFilter += " .AND. " + cValue
     ENDIF
NEXT


set filter to &(cfilter)
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Postby tnhoe » Wed Apr 12, 2006 10:07 pm

i think this is the correct one :-

set filter to &cfilter

or

set filter to (cfilter)
Regards

Hoe, email: easywin3@yahoo.com
User avatar
tnhoe
 
Posts: 83
Joined: Tue Nov 08, 2005 11:09 am
Location: Malaysia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 58 guests