AnsweredAssumed Answered

Data API several tables deep?

Question asked by andrewblackwell on Aug 18, 2017
Latest reply on Aug 25, 2017 by beverly

Hi

 

I have a business requirement to generate data as JSON through an http-request from a FileMaker database. I was going to toy with the new Data API, but I'm guessing I've encountered a limitation.

 

The data should consist of an array of screenings, which in turn contains an array of films per screening (it's a short film festival, so every screening contains several films), and each film in turn contains several cast members in an array. In other words, it's a three-dimensional array.

 

Given that there isn't any way to have portals in portals in FileMaker, I'm assuming I won't be able to represent this through the Data API. Is this correct?

 

If so, how would you recommend solving it? I'm currently thinking of creating a calculated field in the screenings table, which aggregates this information (and using the new JSON functions to do so) - this would allow me to go several tables deep. This calculated field would then be displayed as raw data (i.e. already formatted as JSON within FileMaker thanks to the functions) in a php api call.

 

Would this make sense, or are there better ways to solve this conundrum?

 

Thanks!

Outcomes