[progress Communities] [progress Openedge Abl] Forum Post: Conditionally Export Fields - Part 2

  • Thread starter Thread starter OctavioOlguin
  • Start date Start date
Status
Not open for further replies.
O

OctavioOlguin

Guest
Continuing with https://community.progress.com/community_groups/openedge_development/f/19/t/36047 , where I have a dataset to acomodate: ( http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv33.xsd ) (obtained with bproxsdto4gl tool). I have following situation. applying XML-WRITE to dataset with option OMIT-INITAL-VALUES, keeps the xml free of empty nodes, which is desirable on most cases. The problem came with certain nodes, which initial value is 0, and a value that in certains cases makes sense of 0.00, are removed from layout, but in those cases, the node must be present to assert a value of 0.00. The first case is a run with omit-initial-values eq False, the second has omited values. The problem is in first case, I don't want the Sello = "" and Folio = "" fields and as this, I can get the TasaOCuota field present in the CONCEPTO-IMPUESTOS-TRASLADOS-TRASLADO node. With omit-initial-values, I get id of the Sello and friends fields, but also lost Tasa OCuota, which is a field to be present to indicate a tax rate of 0.00. I'm thinking that, unless I could modify the schema of XML at runtime to specify some inexistent value as initial so the omit-iniital option considers 0.00 not to be initial value and keeps the field on XML output, I should write my own XML-WRITE method, something I really would like not to have to do, for simplicity of system sake... Is there something I can do? Thanks. Examples: first, with OMIT-INITIAL-VALUES equals false second with OMIT-INITIAL-VALUES eq TRUE

Continue reading...
 
Status
Not open for further replies.
Back
Top