Filter and organise data from database

Hi!

I have a cdt that contains a list of cdts. My question is, is it possible to filter the data so that in a list it shows me only those that contain a special element in that list of cdt ?.

For example, I try to find the cdt that contains element 1 in your list. But my problem is that I don't know how to filter based on an if, that is, based on true or false.
Can anyone help me here?

Thanks in advance!

 

  Discussion posts and replies are publicly visible

Parents
  • Hello, thank you very much for the advice. I have already read all the documentation on the subject.

    However, I was unable to fix the problem. When I create the filter I get this error: Cannot filter by field [turn] because it is a complex, multiple, or child of a multiple data type. (APNX-1-4203-020).

    This is my filter:



     

    a!recordFilterList(
      name: "Status",
      options: {
        a!recordFilterListOption(
          id: 1,
          name: "Active",
          filter: a!queryFilter(
            field: "turno",
            operator: "includes",
            value: 'type!{urn:com:lv:mr}LV_MR_SHIFTS'(numero:1)
          )
        )
      },
      defaultOption: "Active",
      isVisible: true,
      allowMultipleSelections: true
    )

    . And here is the structure of my cdt:

    School CDT -> other fields, shift (which is a list of shifts with the structure (number: 1, value: 3))

    So what I am trying is to filter the list of cdt schools from my database, so that it only shows me the cdt schools, which have a  shift with number: 1 ,within their list of shifts. I hope I have explained myself well and appreciate any help. Thank you very much in advance.

    Luis.

Reply
  • Hello, thank you very much for the advice. I have already read all the documentation on the subject.

    However, I was unable to fix the problem. When I create the filter I get this error: Cannot filter by field [turn] because it is a complex, multiple, or child of a multiple data type. (APNX-1-4203-020).

    This is my filter:



     

    a!recordFilterList(
      name: "Status",
      options: {
        a!recordFilterListOption(
          id: 1,
          name: "Active",
          filter: a!queryFilter(
            field: "turno",
            operator: "includes",
            value: 'type!{urn:com:lv:mr}LV_MR_SHIFTS'(numero:1)
          )
        )
      },
      defaultOption: "Active",
      isVisible: true,
      allowMultipleSelections: true
    )

    . And here is the structure of my cdt:

    School CDT -> other fields, shift (which is a list of shifts with the structure (number: 1, value: 3))

    So what I am trying is to filter the list of cdt schools from my database, so that it only shows me the cdt schools, which have a  shift with number: 1 ,within their list of shifts. I hope I have explained myself well and appreciate any help. Thank you very much in advance.

    Luis.

Children