Title: Suggestion Post by: Benjamin G. on July 17, 2024, 10:59:39 am Hi,
It would be nice a feature in studio to generate the 4gl definition corresponding with the form records like this ... PRIVATE TYPE tsr_tlamrgmrg RECORD -- SCREEN RECORD sr_tlamrgmrg (valeurs) cligrp CHAR(1) -- LABEL a00 = FORMONLY.cligrp00 TYPE CHAR ,TITLE='*', JUSTIFY=CENTER; ,numart STRING -- LABEL a01 = FORMONLY.numart00 TYPE CHAR ,TITLE='Article'; ,libart STRING -- LABEL a02 = FORMONLY.libart00 TYPE DATE ,TITLE='Libellé'; ,orgart STRING -- LABEL a03 = FORMONLY.orgart00 TYPE CHAR ,TITLE='Origine'; ,embart STRING -- LABEL a06 = FORMONLY.embart00 TYPE CHAR ,TITLE='Embal.'; ,codmag STRING -- LABEL a15 = FORMONLY.codmag00 TYPE CHAR ,TITLE='Mag.'; ,datmrg DATE -- LABEL a07 = FORMONLY.datmrg00 TYPE DATE ,TITLE='Date'; ,mrgstd DECIMAL(6,2) -- EDIT a08 = FORMONLY.mrgstd00 TYPE DECIMAL(6,2) ,TITLE='%Std.'; ,mrgqte DECIMAL(6,2) -- EDIT a09 = FORMONLY.mrgqte00 TYPE DECIMAL(6,2) ,TITLE='%Qte.'; ,qtemin DECIMAL(9,3) -- EDIT a10 = FORMONLY.qtemin00 TYPE DECIMAL(9,3) ,TITLE='Qte Min.'; ,untven STRING -- LABEL a11 = FORMONLY.untven00 TYPE CHAR ,TITLE='Vente'; ,untuld STRING -- LABEL a12 = FORMONLY.untuld00 TYPE CHAR ,TITLE='Détail'; ,untulp STRING -- LABEL a13 = FORMONLY.untulp00 TYPE CHAR ,TITLE='Complet'; ,ulpven DECIMAL(9,3) -- LABEL a14 = FORMONLY.ulpven00 TYPE DECIMAL(9,3) ,TITLE='Conv.'; ,datprx DATE -- LABEL a16 = FORMONLY.datprx00 TYPE DATE ,TITLE='Date' ,FORMAT='dd-mm-yy'; ,pxaref DECIMAL(10,2) -- LABEL a17 = FORMONLY.pxaref00 TYPE DECIMAL(10,2) ,TITLE='€ Réf.' ,FORMAT='#,##&.&&'; ,pxvstd DECIMAL(10,2) -- LABEL a18 = FORMONLY.pxvstd00 TYPE DECIMAL(10,2) ,TITLE='€ Std.' ,FORMAT='#,##&.&&'; ,pxvqte DECIMAL(10,2) -- LABEL a19 = FORMONLY.pxvqte00 TYPE DECIMAL(10,2) ,TITLE='€ Qte.' ,FORMAT='#,##&.&&'; ,datsys DATETIME YEAR TO SECOND -- PHANTOM FORMONLY.datsys00 TYPE DATETIME YEAR TO SECOND; ,sermrg INTEGER -- PHANTOM FORMONLY.sermrg TYPE INTEGER; ,serart INTEGER -- PHANTOM FORMONLY.serart TYPE INTEGER; END RECORD Regards Title: Re: Suggestion Post by: Reuben B. on July 19, 2024, 02:12:35 am Hi Benjamin,
What I am about to say may seem contradictory to a recent Ask-Reuben article where I suggest be persistent if you believe there is something small that would be beneficial and should be added to the product. With a .per, using base.Channel and various string methods, or in the case with .4fd .42f using XML methods, I would expect it to be relatively trivial to write a 4gl program that parses a form file and DISPLAY (send to stdout) the desired information. Once you have that program, you can then ...
Doing this, you will have a solution quicker and you have more control over what the generated code does. (for instance, does TYPE CHAR equal CHAR(1) or STRING, do you look at other form attributes to influence data type chosen ...) Reuben Title: Re: Suggestion Post by: Benjamin G. on July 19, 2024, 09:59:27 am Hello,
I hadn't thought of this solution which seems to be the best and which allows me to generate the 4gl code as I want. Thank you very much. |