Customised API with Join or Addon?

I am trying to create an API over 2 tables but I don’t know if I need to use a join or better an Addon.

Table A:
id
category
detail_no

Table B:
id
project_id
category
detail_no

Input:
category, detail_no, project_id

Output:
all records of Table A that match the input category and detail_no and a boolean of true (as _selected) if a record exists in Table B matching the input project_id, category and detail_no

Too complicated for a Xano newbie like me ;).
Could you help please?

Hey Oliver, what do you want to accomplish for the data you want returned? That is going to dictate which to use.

Also what are Table A and Table B?

Hi Michael, it is a read operation only.
I need the data of all the fields in Table A and just a boolean true in a field called ‘selected’ if a record in Table B exists.
Table A are all multiple choice options of a question and Table B are basically only the selected answers by one user/project.

This sounds like a perfect use case for an Addon to return existence. Are you mapping the existence based on the table reference of Table B to Table A (names of the table would help). Or on a different field? Or of multiple?

Hi Michael,
thanks for your help.
In the meantime I managed to create the Addon and it works - hurray :smiley:

1 Like