API call failing due to missing variables

Hello,

I have a function that does the following actions from a high level:

  • Queries records from two tables
  • drills down into a specific field that links both tables [Table 1 ID (not xano) is primary and Table 2 has table 1's id (as secondary releationship)
  • Where the value in that field appears in both tables, add the xano id from the second table to the first table

I have tested this and it worked in principle.

However, there are records where Table 1's id won't appear in Table 2, and this is intentional. In these scenarios, I want the API call to skip them and move unto where Table 1's id appears in Table 2, and executes the xano id linkage. This doesn't appear to be the case as the API fails when that field is empty.

How do I go about this?

2 replies