How to sort add-on response

Options
sile
sile Member
edited August 2023 in ? Working with APIs

Hi all,

I have to tables. The entries of the child table are referenced to entries of the parent table.

Now I would like to sort the entries of the child table. I included an add-on, please see screenshot of the response of my api call (screenshot 1). I would like to sort "bildung_sludes_id[] by the value of "Slide_number". Should I add a filter and sort (see Addon in screenshot 2)? But what path do I have to choose?

Screenshot 1:

Screenshot 2:

Tagged:

Answers

  • Alimama
    Alimama Member
    Options

    I hope I understood your requirement well enough. I would suggest you do the sorting in the function stack (the Addon Workflow") of your addon. Do it on the "Output" tab of your "Query All" statement (see screenshot below). That way, it should already come sorted to the parent table. Hope this helps.

  • sile
    sile Member
    Options

    Thank you very much for your suggestion! I think you understood well enough what I am after.

    I also thought about that but it does not work. I think the problem here might be that in the addon the response is only one entry from the table. The input refers to only one row and therefore no sorting is done in the add-on by itself. See response of the add-on in the screenshot.

    I hope that I was could explain clear enough.