HMG EDIT EXTENDED

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 2361
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 607 times
Been thanked: 124 times
Contact:

HMG EDIT EXTENDED

Post by serge_girard » Fri Nov 01, 2019 5:46 pm

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

franco
Posts: 350
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 11 times

Post by franco » Sat Nov 02, 2019 4:01 pm

Serge, could you create a temporary index
do your function. Then go back to normal index.
Franco
Franco Bushie
Canada

User avatar
serge_girard
Posts: 2361
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 607 times
Been thanked: 124 times
Contact:

Post by serge_girard » Sat Nov 02, 2019 5:33 pm

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

franco
Posts: 350
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 11 times

Post by franco » Mon Nov 04, 2019 4:50 pm

Serge, what line numbers did you add ?
Franco
Franco Bushie
Canada

User avatar
serge_girard
Posts: 2361
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 607 times
Been thanked: 124 times
Contact:

Post by serge_girard » Tue Nov 05, 2019 7:22 am

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

franco
Posts: 350
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 11 times

Post by franco » Tue Nov 05, 2019 4:45 pm

Thanks Serge,
Franco
Franco Bushie
Canada

Post Reply