There are 3 DBCOMBO (TIPO DE PONTO, ÁREA, FATURAMENTO)
For testing purpose I changed the ÁREA COMBO from dropbox to droplist but result is the same
New record:
Fill data and save:
Edit:
TIPO FATURAMENTO shows 03 but I´d like it to show FARMACIA, same for FATURAMENTO. ÁREA shows nothing (droplist).
I´m not loosing data anymore if I don't click the combos when editing. It was my fault because I forced showing the items for the combos. See comented out in source code.
- Code: Select all Expand view
......
aVars[ 5 ] := pdvs->CODT //ExtNomeTipPdv( pdvs->CODT )
aVars[ 6 ] := pdvs->NCIC
aVars[ 7 ] := pdvs->IEST
aVars[ 8 ] := pdvs->CODA //ExtNomeArea( pdvs->CODA )
.....
aVars[ 21 ] := pdvs->DINI
aVars[ 22 ] := pdvs->TIPF
aVars[ 23 ] := pdvs->COMI
===========================================================================
REDEFINE GET aGets[ 1 ] VAR aVars[ 1 ] ID 101 OF oFld:aDialogs[ 1 ]
REDEFINE GET aGets[ 2 ] VAR aVars[ 2 ] ID 102 OF oFld:aDialogs[ 1 ] PICTURE "@!"
REDEFINE GET aGets[ 3 ] VAR aVars[ 3 ] ID 103 OF oFld:aDialogs[ 1 ] VALID if( ChkVaz( aVars[ 3 ] ), ( aButt[ 1 ]:Enable(), .T. ), ( aButt[ 1 ]:Disable(), .F. ) ) PICTURE "@!"
REDEFINE GET aGets[ 4 ] VAR aVars[ 4 ] ID 104 OF oFld:aDialogs[ 1 ] PICTURE "@!"
REDEFINE DBCOMBO aGets[ 5 ] VAR aVars[ 5 ] ALIAS "TIPP" ITEMFIELD "CODT" LISTFIELD "NOME" ID 105 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET aGets[ 6 ] VAR aVars[ 6 ] ID 106 OF oFld:aDialogs[ 1 ] VALID ChkNCic( aVars[ 6 ], aGets[ 6 ] )
REDEFINE GET aGets[ 7 ] VAR aVars[ 7 ] ID 107 OF oFld:aDialogs[ 1 ]
REDEFINE DBCOMBO aGets[ 8 ] VAR aVars[ 8 ] ID 108 OF oFld:aDialogs[ 1 ] ALIAS "AREA" ITEMFIELD "CODA" LISTFIELD "NOME" ON CHANGE SetScopeRota( aVars[ 8 ], aGets[ 54 ] )
REDEFINE GET aGets[ 9 ] VAR aVars[ 9 ] ID 109 OF oFld:aDialogs[ 1 ] PICTURE "@!"
........
REDEFINE DTPICKER aGets[ 21 ] VAR aVars[ 21 ] ID 121 OF oFld:aDialogs[ 1 ]
REDEFINE DBCOMBO aGets[ 22 ] VAR aVars[ 22 ] ID 122 OF oFld:aDialogs[ 1 ] ALIAS "TIPF" ITEMFIELD "CODF" LISTFIELD "NOME"
REDEFINE GET aGets[ 23 ] VAR aVars[ 23 ] ID 123 OF oFld:aDialogs[ 1 ] PICTURE "99"
If nobody reported earlier it might be related to recent changes in COMBOBOX class or I´m missing something.