AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 08.12.2011, 16:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
daxdilip: Tip str2CapitalWord function to convert string into TitleCase
Источник: http://feedproxy.google.com/~r/blogs...o-convert.html
==============
Tip str2CapitalWord function to convert string into TitleCase
We have some custom export routines written in our solution which ftp's .csv file from AX. Now, the target system needed one of the column names in TitleCase.

Solution:
In my previous experience, I have used strUpr and strLwr functions in AX, but never had a requirement to convert something into TitleCase, Initially, for a quick workaround, I used Proper function in Excel to convert the column into TitleCase. But, the right way to fix was in the source program. so as soon as I got some time did bit of digging in AX standard functions and found out we have 2 functions:

1. str2Capital

This function just converts the first letter of the word as UpperCase so didn't match my requirements e.g.

Input String : "new south wales"

Output String: print str2Capital("new south wales") returns New south wales


2. str2CapitalWord

This function was exactly what I was looking for. It converts the first letter of each word in the sentence to
uppercase.

Input String: "new south wales"

Output String: "New South Wales"



Источник: http://feedproxy.google.com/~r/blogs...o-convert.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Последний раз редактировалось Poleax; 08.12.2011 в 23:37.
Старый 20.11.2023, 10:33   #2  
Damn is offline
Damn
Участник
 
436 / 154 (6) ++++++
Регистрация: 28.05.2003
Адрес: в глуши
С помощью какой функции можно обработать следующую ситуацию ?
Input String : "new south Wales"
Output String: "New south Wales"

Конечно что здесь можно использовать сочетание strPoke, strUpr и subStr. Но вдруг есть штатная функция.
__________________
Дмитрий
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
daxdilip: Tip – EP Customization ( Dynamically Loading Report Folder from Network based on Store Parameter) Blog bot DAX Blogs 0 08.06.2011 02:11
daxdilip: Tip How to Trace a Call to an AIF Web Service Blog bot DAX Blogs 0 26.11.2010 00:12
daxdilip: Tip: How to display the AOS Name at the status bar Blog bot DAX Blogs 5 15.11.2010 13:55
CRM DE LA CREME! Some useful CRMform jscripts Blog bot Dynamics CRM: Blogs 0 02.09.2009 10:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 22:25.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.