HMG EDIT EXTENDED

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

HMG EDIT EXTENDED

Post by serge_girard »

Hello,

Does anybody knows to change HMG EDIT EXTENDED filter options?
Now it says: 'Comparrission Operator:" Equal, Not equal,...

I want it to extend with the $ operator (as a LIKE or IN operator)

Serge
There's nothing you can do that can't be done...
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: HMG EDIT EXTENDED

Post by franco »

Serge, could you create a temporary index
do your function. Then go back to normal index.
Franco
All The Best,
Franco
Canada
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMG EDIT EXTENDED

Post by serge_girard »

I made some changes to \source\EditEx\h_edit_ex.prg AND \source\h_init.prg.
I added the $ operator to _HMG_SYSDATA [ 129 ] [33]

This work.

Serge
There's nothing you can do that can't be done...
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: HMG EDIT EXTENDED

Post by franco »

Serge, what line numbers did you add ?
Franco
All The Best,
Franco
Canada
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMG EDIT EXTENDED

Post by serge_girard »

Franco,

In h_edit_ex.prg

Code: Select all

Function ABM2EstableceFiltro()
aOperador := { "=", "<>", ">", "<", ">=", "<=", '$' }
..
DO CASE
CASE nCompara == 7  .AND.  _aStructure[nCampo,DBS_TYPE] == "C" // IN-LIKE-$ OPERATOR SG NOV-2019
   _cFiltro := "'" + HMG_UPPER( ALLTRIM( cValor ) ) + "'" + " $ HMG_UPPER(" + _cArea + "->" + ;
   _aStructure[nCampo,DBS_NAME] + ")"  
 
In h_init.prg

Code: Select all

For every language:
    ".Lower or Equal Than...",;  // 32
      "$" }         // 33
And recompile all!
Regards, Serge
There's nothing you can do that can't be done...
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: HMG EDIT EXTENDED

Post by franco »

Thanks Serge,
Franco
All The Best,
Franco
Canada
Post Reply