search in related fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iioi
    Member
    • Jun 2022
    • 48

    search in related fields

    1. Create entity1 and entity2, relation one to many entity1 <-> entity2, use multiple fields in relation

    Click image for larger version

Name:	2022-07-11 12_13_05.png
Views:	246
Size:	8.4 KB
ID:	81508


    2. add entity2 fileld in entity1 list layout

    Click image for larger version

Name:	2022-07-11 12_13_53.png
Views:	192
Size:	14.0 KB
ID:	81509


    3. Search in entity1 list do not handle entity2 field content

    Click image for larger version

Name:	2022-07-11 12_14_57.png
Views:	204
Size:	4.8 KB
ID:	81510
  • rabii
    Active Community Member
    • Jun 2016
    • 1260

    #2
    you need to add the field on the search parms on entityManager or enable fullSearchText to resolve this.
    Rabii
    Web Dev

    Comment

    • lazovic
      Super Moderator
      • Jan 2022
      • 820

      #3
      Hi iioi,

      User rabii gave you a good advice.

      And I would like to recommend you, in addition, a slightly different solution, perhaps it will suit you.

      Go to Administration > Entity Manager > [your_entity] > Layouts > Search Filters and drag the field you need to search from Disabled column to the Enabled column. There can be many fields in this column, there are no restrictions.
      Now, when you go to your entity's records List View (as on the screenshot), click on the ellipsis next to the search icon and select the required field.
      Then, you can use for search the operators Is, Is Not, Not Empty, etc.

      You can learn more about searching in EspoCRM here:
      https://www.espocrm.com/tips/search-types/,
      https://docs.espocrm.com/user-guide/text-search/.

      Comment

      • iioi
        Member
        • Jun 2022
        • 48

        #4
        Originally posted by rabii
        you need to add the field on the search parms on entityManager or enable fullSearchText to resolve this.
        I'm very sorry, but what is "search parms" ? there is no "search parms" in documentation and google for "espocrm search parms" give no relevant results.
        Text Filter Fields in entity does not allow to select Entity2 field (in attach)

        Enabling fullSearchText with rebuild gives no result.

        Comment

        • iioi
          Member
          • Jun 2022
          • 48

          #5
          Originally posted by lazovic
          Hi iioi,

          User rabii gave you a good advice.

          And I would like to recommend you, in addition, a slightly different solution, perhaps it will suit you.

          Go to Administration > Entity Manager > [your_entity] > Layouts > Search Filters and drag the field you need to search from Disabled column to the Enabled column. There can be many fields in this column, there are no restrictions.
          Now, when you go to your entity's records List View (as on the screenshot), click on the ellipsis next to the search icon and select the required field.
          Then, you can use for search the operators Is, Is Not, Not Empty, etc.

          You can learn more about searching in EspoCRM here:
          https://www.espocrm.com/tips/search-types/,
          https://docs.espocrm.com/user-guide/text-search/.
          It's not an option.
          You can't force employees to serach one thing in one way and other but close the same thing in other way.

          Comment

          • lazovic
            Super Moderator
            • Jan 2022
            • 820

            #6
            iioi,

            It seems to be that without changing your instance files, you won't get the solution you want.

            For example, with the One-to-Many relationship that your entities currently have, you can set up the Text Filter Fields while editing Entity2 to search Entity1's name and other fields. But not vice versa.

            Comment

            • iioi
              Member
              • Jun 2022
              • 48

              #7
              Originally posted by lazovic
              iioi,

              It seems to be that without changing your instance files, you won't get the solution you want.

              For example, with the One-to-Many relationship that your entities currently have, you can set up the Text Filter Fields while editing Entity2 to search Entity1's name and other fields. But not vice versa.
              I think you are right, that's why I post it in "feature request".

              Can you please direct me to instance files to be change ? May be I can do it by myself.

              Comment

              Working...