filter data coming from the service

I have an endpoint which returns data consists of 5 columns (text and date fields). I want to keep an text field and then when I enter values in the text field, I want to filter the data based on the value I entered.

It should filter dates if possible

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to vijayp6380

    a!localVariables(
      local!search: "KFC",
      local!data: {
        {
          name: "Vijay",
          dob: 10/01/2001,
          address: "near 4th Busstop"
        },
        {
          name: "Pavan",
          dob: 11/11/2011,
          address: "near KFC"
        },
        {
          name: "Mohaseen",
          dob: 11/11/2011,
          address: "near Church street"
        }
      },
      index(
        local!data,
        where(like(lower(local!data.address), lower("*" & local!search & "*"))),
        null
      )
    )

    like() with the asterisk checks whether a string matches that pattern and supports lists

    where() returns the indexes of true values in a list of booleans

Children