Skip to main content
Known Participant
Jun 22, 2022 8:51 AM UTC
Solved

Filter the output through GET API

i have a table of 6 fields . i am requesting the data with GET request so that i want to show only 3 fields from the table. How can i do that?

    peter.lewis
    Employee
    Jun 22, 2022 2:41 PM UTC

    You should be able to add the "selection" parameter inside of your a!query() function to specify which fields should be returned. Try adding something like this:

    selection: {
      a!queryColumn(field: "field_one"),
      a!queryColumn(field: "field_two"),
      a!queryColumn(field: "field_three")
    }

    7 replies

    stefanhelzle0001
    Brainy
    Jun 22, 2022 9:04 AM UTC
    neilb2444Author
    Known Participant
    Jun 22, 2022 9:17 AM UTC

    in the image there is .data.color. it is working fine because we are trying to return only single field. but if i want to return 2 or 3 fields what should i do?

    stefanhelzle0001
    Brainy
    Jun 22, 2022 9:20 AM UTC

    Add more fields to the fields parameter and reduce the last line to just ".data" to return a list of data structures.