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.
blog comments powered by Disqus