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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 05.08.2008, 19:41   #1  
EVGL is offline
EVGL
Banned
Соотечественники
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
 
4,445 / 3001 (0) ++++++++++
Регистрация: 09.07.2002
Адрес: Parndorf, AT
XAL 3.5: поиск по шаблону
Коллеги, я в отчаянии: в процессе перехода с XAL 3.5 на DAX 4.0 возникла задача найти в XAL все номера номенклатур, в которых содержится слеш, просто отфильтровать их в соответствующей форме.

В Аксапте просто: запрос типа "*/*". А вот как в XAL задать такой фильтр - я без понятия. Кто поможет?

Последний раз редактировалось EVGL; 05.08.2008 в 19:45.
Старый 05.08.2008, 20:02   #2  
HorrR is offline
HorrR
Участник
 
340 / 30 (2) +++
Регистрация: 18.02.2008
Адрес: Киев
Воть, не знаю можно ли на лету это сделать через стандартные кейворды. НО есть как минимум 2 способа:

1. заюзать прямой сиквеловский запрос при помощи result=SQLSELECT(<direct query>)
2. В цикле выборки
Цитата:
search SomeTable
end
организовать проверку if Match(SomeTable.SomeField, yourMask), время выполнения, на сколько я понимаю, в вашем случае не очень актуально.
__________________
Axapta has seduced me deadly!
За это сообщение автора поблагодарили: EVGL (5).
Старый 05.08.2008, 20:58   #3  
EVGL is offline
EVGL
Banned
Соотечественники
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
 
4,445 / 3001 (0) ++++++++++
Регистрация: 09.07.2002
Адрес: Parndorf, AT
Спасибо, добрый друг. Вот что получилось:

X++:
search StockTable
    if Match("?*/?*", StockTable.ItemNumber) then
        print StockTable.ItemNumber
    endif
end

pause
Кажется, я уже ненавижу XAL.
Старый 05.08.2008, 21:39   #4  
HorrR is offline
HorrR
Участник
 
340 / 30 (2) +++
Регистрация: 18.02.2008
Адрес: Киев
Так как правило заканчивается всякое знакомство с ксалом) Скорее бы закончился наш проект)
__________________
Axapta has seduced me deadly!
Старый 05.08.2008, 23:24   #5  
miklenew is offline
miklenew
Участник
Аватар для miklenew
MCBMSS
1C
Лучший по профессии 2009
 
1,688 / 433 (18) +++++++
Регистрация: 10.07.2006
Адрес: г. Ликино-Дулёво
Цитата:
Сообщение от EVGL Посмотреть сообщение
Коллеги, я в отчаянии: в процессе перехода с XAL 3.5
Сори за вопрос, а что такое XAL?
Старый 06.08.2008, 00:01   #6  
oip is offline
oip
Axapta
Лучший по профессии 2014
 
2,564 / 1416 (53) ++++++++
Регистрация: 28.11.2005
Записей в блоге: 1
http://www.axapta.mazzy.ru/lib/names/
__________________
С уважением,
Олег.
За это сообщение автора поблагодарили: miklenew (1).
Старый 06.08.2008, 10:54   #7  
Pavel is offline
Pavel
SAP
SAP
 
2,760 / 239 (13) ++++++
Регистрация: 14.12.2001
Адрес: Moscow
Практически бейсик или паскаль.

SEARCH имя таблицы USING индекс
WHERE условие
действие
END

1) Условие - поиск символа в строке, строка – поле «имя номенклатуры» из текущей записи. По справке можно вызвать описание функций обработки строк и примеры использования.
2) Индекс существенно ускорит процесс, когда табличка немаленькая.

Syntax:
Match(Pattern:STR, s:STR): INT
Return value:
INT
Description:
Compares a fixed expression with a text string. If the fixed expression Pattern matches the text s, 1 is returned (true). Fixed expressions are described below.

Example:
Match("sen", "Andersen")-> 1
Match("sen","Schmidt")-> 0
Match("<A?*sen", "Andersen")-> 1

Match("<H?*sen", "Andersen")-> 0
The fixed expression defines the pattern being searched for. The system does not differentiate between lower and upper case.

The following applies to fixed expressions used in connection with the Match function:

x
An ordinary character (not one of those listed below) is to be matched.

\
A backslash causes a specific character to be matched. "\$" therefore matches a dollar sign.

< or ^
A "less than"sign or a circumflex at the start of an expression is used to match the start of a line.

> or &
A "greater than"sign or an Ampersand at the end of the expression is used to match the end of a line.

? or .
A question mark or a full stop will match any character (except Return, new line).

:a
A colon specifies a group of characters, indicated by the character which immediately follows, to be matched. ":a" sets the match to alpha characters, ":d" to numeric characters, ":n" to alphanumeric characters, ": " to blanks, tabulations and control characters such as Return (new line).

*
An expression followed by an asterisk requires a match for none or several occurrences of the expression. "fo*" will locate "f", "fo", "foo" etc.

+
An expression followed by a plus sign specifies a match is to be found for one or several occurrences of the expression. "fo+" matches "fo" etc.

-
An expression followed by a minus sign requires a match for no or one occurrence of the expression.

[]
A string of characters enclosed within square brackets specifies that a match is required for every character in this text, but no other characters. If the first character in the text is a circumflex, the expression matches every character except for Return, new line and the characters in the string. "[xyz]" matches "xx" and "zyx", while "[^xyz]" matches "abc", but not "axb". A string of characters can be specified with two characters separated by `-'. Note that [a-z] matches characters whereas [z-a] never matches.

"[xyz]" matches "xx" and "zyx", while "[^xyz]" matches "abc", but not "axb". A string of characters can be specified with two characters separated by `-'. Note that [a-z] matches characters whereas [z-a] never matches.
A combination of fixed expressions is itself known as a fixed expression.
Теги
xal

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
palleagermark: Data Migration Tool - Microsoft XAL to Microsoft Dynamics AX Blog bot DAX Blogs 0 13.05.2008 13:05
Поиск в Grid по полю DataMethod Tiruvileijadal' DAX: Программирование 20 14.05.2007 13:37
"поиск" braathe DAX: Программирование 6 24.03.2006 13:07
Поиск по подстроке JohNick DAX: Программирование 8 06.03.2004 22:24
Поиск по полю временной таблицы Swetik DAX: Программирование 2 10.12.2003 11:35

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

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

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