Ok so we have an answer to dynamically loading a pdf into an iframe for a table. 2 pieces to this puzzle.
1st step is to create a pipe to set a text field to the value of the File URL.
Here’s the API call to make:
https://api.tadabase.io/api/v1/data-tables/{tableId}/records/{recordId}
2 parameters:
Add your headers:
Map the response. Make sure to change ‘field_39’ to the correct field for your app. This is the file field.
Back at the data builder, make a table rule to set a text field’s value to the pipe response on create. We’ll reference this field later. I called my field {File URL}.
Create an equation field and enter this equation - don’t forget to change the field name if you have to.
CONCAT('<p><iframe', CHAR(32), 'src="',{File URL},'"></iframe></p>')
Everything in this demo works perfectly now:
https://dataflowstudios.tadabase.io/pdf-preview#!/file-preview
Side note - it works for images as well. Haven’t tested any other file types yet.