Allow Mixed Case with genxml
We would like some way to have mixed case variables be part of a structure which is included in xfServerPlus situations. That way, when someone is looking in CS, they can see the name as it is intended. For example, if you have a field called PURCHASEORDERNUMBER, it becomes Purchaseordernumber. We would like some way to tell genxml to make this PurchaseOrderNumber.
How would genxml know where to apply word breaks in a string like PURCHASEORDERNUMBER? What you are seeing is what we refer to as "xf case", which essentially means uppercasing the first character, lowercasing remaining characters, and maintaining underscore characters (not relevant in your example).
The closest you can get with genxml would be to add underscores between the words (i.e. changing the field name to PURCHASE_ORDER_NUMBER), you would wind up with a property named Purchase_order_number.
Beyond that, you would need to resort to using CodeGen and developing custom templates to produce your xfNetLink client classes instead of genxml and gencs. If you were to do that, and change the names to use underscores to break words, then you could achieve exactly what you are asking for.
9/21/2022 3:06 AM 0
The other option is to make genxml smarter like CodeGen and to upcase the character following an underscore and remove the underscore, effectively making PURCHASE_ORDER_NUMBER into PurchaseOrderNumber, again, much like CodeGen does.
Since we use DBL2XML to create the xml files, and CodeGen doesn't support that (at least not that I'm aware of), it would be next to impossible to use CodeGen for this.
9/21/2022 11:36 AM 0
9/24/2022 2:15 AM 0