Equivalent to NOT
-
2010年9月29日 5:43
Hi All,
There are a couple of things I would like to know whether it is possible to be done within MDS.
The first is whether we can build regular expressions referencing attribute values. for example [^attribute1]
And the second is if there is a NOT operator to negate rules such as contains in patter, contains a subset, starts with etc etc
Any information provided would be much appreciated.
Thanks & regards,
Garrick Kong
すべての返信
-
2010年9月29日 8:36モデレータ
Hello Garrick
for your first question, please check this link :
http://msdn.microsoft.com/en-us/library/ee633791.aspx
USE MDM_Sample; GO SELECT mdq.RegexIsMatch( N'123-451-6789', N'^\d{3}-\d{3}-\d{4}$', 0);
for your second question, with API you can use a "NOT IN" operator
example :
EntityMembersGetCriteria emgc = new EntityMembersGetCriteria(); emgc.EntityId = entityId; emgc.ModelId = modelId; emgc.VersionId = versionId; emgc.PageSize = 10000; emgc.DisplayType = DisplayType.NameCode; string MemberNameToSearchFor = "yourMemberCode1"; string Member2NameToSearchFor = "yourMemberCode2"; emgc.SearchTerm = String.Format(" [Code] NOT IN ('{0}','{1}') 0.5 1 0.32 ", MemberNameToSearchFor,Member2NameToSearchFor); EntityMembersInformation emi = new EntityMembersInformation(); Form1 frm = (Form1)Form1.ActiveForm; if (frm != null) { using (MDS_WS.c = frm.mds.CreateMdsProxy()) { EntityMembers em = Common.MDS_WS.c.EntityMembersGet(Common.MDS_WS.intl, emgc, out emi, out Common.MDS_WS.or); if (em != null) { Common.MDS_WS.colMembers = em.Members; } lstMembers.Items.Clear(); foreach (Member m in em.Members) { lstMembers.Items.Add(new MemberNameCode(m.MemberId)); }}}
Regards,
Xavier Averbouch- 回答の候補に設定 Xavier Averbouch [xavave]Moderator 2010年9月29日 8:38

