RSearch criteria

Hello,

I would like to extract instuments by using .Net COM RSearch library.

In order to define the search criteria I use the Excel wizard. The criteria generated are correct but the syntax for logical operation is different from the one used with .Net COM lib.

For example in Excel we can use "ne" "and" "eq" keyword. If I copy these criteria in .Net COM (as mentionned in an other question) I get an error saying these keyword are not valid criteria

Here is a simple example.

Criteria Generated with Excel wizard :

''DbType eq \'CORP\' and RCSAssetCategory eq \'A:J\' and IsActive eq true and DebtType ne \'SYKHYB\' and DebtType ne \'SUK*\''

What could be the equivalent for .Net COM ?

I tried this :

DbType:CORP RCSAssetCategory:A:J IsActive:Yes DebtType:!='SYKHYB' DebtType:!='SUK*'

But I get an erro saying I cant duplicate DebtType criteria...

Where could I find a documentation explaining the criteria operation syntax for .Net COM ?

Thank you!

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    The string representation of the criteria you can use in both RSearch function in Excel and RSearch COM library is

    "RawContextFilter:'DbType eq \'CORP\' and RCSAssetCategory eq \'A:J\' and IsActive eq true and DebtType ne \'SYKHYB\' and DebtType ne \'SUK*\''"
    The Search wizard splits the above into multiple cells and references the range. I guess you didn't notice that the second argument of RSearch function in Excel referenced the range containing multiple cells.

Answers