Skip to main content
Known Participant
Apr 23, 2024 12:25 PM UTC
Solved

How can I do fuzzy search on text field when queryrecordtype

How can I do fuzzy search on text field when queryrecordtype, like "like '%text%' " in sql

    shubhama926776
    Brainy
    Apr 23, 2024 12:37 PM UTC

     [mention:2aea1bf0b6954f94815518e79da990c7:e9ed411860ed4f2ba0265705b8793d05] 

    You can use includes operator 

    a!queryRecordType(
      recordType: Replace_RecordYType,
      filters: a!queryFilter(
        field: Replace_ FieldName,
        operator: "includes",
        value: Replace_Value
      ),
      pagingInfo: a!pagingInfo(1, 5000)
    )

    शुभम्

    8 replies

    stefanhelzle0001
    Brainy
    Apr 23, 2024 12:30 PM UTC

    I remember that you are talking to an API to do that. In that case, the API needs to support it directly.

    Known Participant
    Apr 23, 2024 12:37 PM UTC

    I made a recordtype that connects to the API, the recordtype has snyc all the data from API, I want to query from the recordtype, is it possible to do fuzzy search on recordtype?

    rohitm7223
    Participating Frequently
    Apr 23, 2024 12:35 PM UTC

    You can create a Stored Procedure, which can utilize various algo's like , JARO Winkler, Levenshtein etc. on the specific text field in the backend. which can return Primary keys of record. and then you can use those as per your requirement. 

    shubhama926776
    Brainy
    Apr 23, 2024 12:37 PM UTC

     [mention:2aea1bf0b6954f94815518e79da990c7:e9ed411860ed4f2ba0265705b8793d05] 

    You can use includes operator 

    a!queryRecordType(
      recordType: Replace_RecordYType,
      filters: a!queryFilter(
        field: Replace_ FieldName,
        operator: "includes",
        value: Replace_Value
      ),
      pagingInfo: a!pagingInfo(1, 5000)
    )

    शुभम्
    Known Participant
    Apr 23, 2024 12:41 PM UTC

    Awesome, thank you! 

    shubhama926776
    Brainy
    Apr 23, 2024 12:43 PM UTC

    Is this what you're looking for?

    शुभम्