The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

setting a search condition on a lookup property but with text

Hi

i would like to set a search condition on a lookup property but i have to search for a text value within:

so i would like to use

SearchCondition sc = new SearchCondition();
sc.ConditionType= MFConditionType.MFConditionTypeStartsWith;

how can i do this on a lookup value?

for example:

in a multi lookup there are several selected values for my search criteria

1) 1.4.3.2

2)  2.3

3)  1.1.4

now i have to find all objects, that have selected values in their lookups, but there can also be values such as:

1) 1.4.3.2.5     -> this one starts with the first search criteria 1.4.3.2 so it should be in the result collection

2) 2.3.4.5         -> this one starts with the second criteria 2.3 so it should be in the result collection

...

so i have to find all objects that have values in a lookup that start with 1.4.3.2 and 2.3 and so on. - from the search criteria

how can this be done?

thank you

Parents Reply Children
  • Hi Craig

      and you Craig are telling the same thing, so i had to re-think your logic.

    I should first have to find all the search conditions from those 3 that i have set as my original search conditions, and then all objects that are connected to those lookup values.

    At first i didn't get the logic behind that, because i was starting my search logic from the other end.

    I wanted to search for all the objects without getting all search IDs, just "starts with", so i apologize to DCPDamon. You are both right.

    i would like to accept the answer from DCPDamon, but at the same time yours, since they are telling me the same logic Slight smile

    Can i accept both?

    thank you

  • Simply click the accept button next to both. A question can have two accepted answers.