Capitalize a nameTag(s): Powerscript

For example, to change "john smith" to "John Smith", you can use datawindow function WordCap()
ls_string ='john smith'
ls_string = dw_1.Describe ( "Evaluate('WordCap(~"" + ls_string + "~")',0)")
Or use the appropriate database function (if supported), for Oracle it looks like
SELECT InitCap('john smith') into :ls_name
FROM dual USING SQLCA;
For PFC, use the of_WordCap() method from the n_cst_string object.


If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]