Page 1 of 1

How can I change the PICTURE "99,999" from a numeric field to this PICTURE "9,999.9"

Posted: Mon Mar 11, 2024 7:54 am
by digitsoft
Good morning Roger
How can I change the PICTURE "99,999" from a numeric field to this PICTURE "9,999.9" and have it reflected on the screen at once

Thank you.

Re: How can I change the PICTURE "99,999" from a numeric field to this PICTURE "9,999.9"

Posted: Tue Mar 12, 2024 12:26 am
by Piotr D
Hi Nolberto,
the simplest way is to double the DCGET like:

@ 1,1 DCGET nVar PICT "999,99" HIDE {|| nChoice=2}
@ 1,1 DCGET nVar PICT "9,999.99" HIDE {||nChoice=1}

Regards,
Piotr

Re: How can I change the PICTURE "99,999" from a numeric field to this PICTURE "9,999.9"

Posted: Wed Mar 13, 2024 8:55 am
by digitsoft
Thanks for your help
use this solution

bPicture := {|| IIF(LEFT(cMetodo,3)="FSS" .AND. LEFT(cFp,1)="Q","9999.9","99,999") }
@ 05.4,01 DCSAY "Duración:" GET cTiempo PICT bPicture MESSAGE "Digite el Tiempo ó Duración del Prestamo" INTO oMsgBox ;
GETPOS 05.25,08 ;
GETOBJECT oTiempo ;
POPUP {|n|DC_PopCalc(n)} ;
POPKEY xbeK_F6 ;
VALID {|c| ValidarCampo(5.1,aApp,GetList) } ;
PARENT oMyGroup1 ;
WHEN {|obj| lEditar .AND. SQLFieldGet(oDXCAM02,"BCE_Cap_An") = 0} ;
HIDE {|| LEFT(cCodTip,2)="PR" }