Help - ARIS Script - Find function does not work

Translate this pagebookmark or share this page
Anja's picture

Posted: 2012-07-10
733 views | 3 comments | category: ARIS Support

0
show all articles

Hello,

maybe anyone can help me. I am trying to find a String within an object attribute using the Find function:

 

var Items_Found = db.Find(Constants.SEARCH_OBJDEF, 22, Constants.AT_EXT_1, g_nLoc, search_Term, Constants.SEARCH_CMP_GREATEREQUAL);

 

This is not working, I never find any result. But if I search for Objects (typenum 22) and compare the search_Term to each object-attribute I find results. Normally for example the search_Term "test" has to be found in an object attribute "testing was finished". The problem seems to be with the compare flag, cause every other parameter is tested and works fine.

What is wrong with this code? Any idea?

 

Thanks in advance!

Comments
Anja's picture

This is not working as well:

 

var searchItem = db.createSearchItem(Constants.AT_EXT_1, g_nLoc, "test*", Constants.SEARCH_CMP_EQUAL, false, true) //case sensitive, allow wildcards
 

var Items_Found = db.Find(Constants.SEARCH_OBJDEF,null,searchItem);

Ciska's picture

Hi Anja,

As for the first comment:

search_Term = "test*"

var Items_Found = db.Find(Constants.SEARCH_OBJDEF, 22, Constants.AT_EXT_1, g_nLoc, search_Term, Constants.SEARCH_CMP_WILDCARDS);

The second comment however should work.....

Ciska

Anja's picture

Thanks for your answer. The try out of the second comment works, now. :)