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

How to search an object with a string in a multi select lookup

Hi...

I am trying to perform a search for an object. The search criteria is a string inside a text property and I have to find this text inside a multi-select lookup.

But I don't know how to format the string for the search without getting a type conflict. 

I also don't know if this kind of search operation is possible.

Does anybody know, if it is possible and how?

Greetings from germany 

Michael

Parents
  • So you have a limited set of objects listed in a multi-select lookup property, right?

    IT should be possible to loop through these objects and check if the Name or Title object contains the text string.

    Another approach might be to create a search with conditions that the objects must have relations with the object where they are listed in the multi-select lookup and condition that Name or Title contains the text string, you are looking for.

Reply
  • So you have a limited set of objects listed in a multi-select lookup property, right?

    IT should be possible to loop through these objects and check if the Name or Title object contains the text string.

    Another approach might be to create a search with conditions that the objects must have relations with the object where they are listed in the multi-select lookup and condition that Name or Title contains the text string, you are looking for.

Children
  • No... For example:

    I've got an invoice object. Inside this object is a text-property, which conains the name of an employee. On the other side I have objects for the departments of our customer. Inside the objects for the department is a multiselect-lookup, whicht contains the employees of this department. 

    When I click the Save-Button in the metadata-card I wan't do perform a search, whicht tries to find the department-objects which have a multiselect-lookup, that contains the name of the employee.  

  • Hi there, you can perform this type of search/match using an event handler (BeforeCheckInChanges.) You'll need to parse the string of names in the text field and use these values as as part of the search condition to look for in the department objects.  The result set of the search condition should match the object you're looking for, this would then be the value used to set the field for this content on the invoice.  I'd recommend you reach out to your preferred services provider if you need assistance in coding this functionality.