Okay so I've searched and searched and I can't seem to find anyone who's been able to pull this off, and every time someone asks, they?re referred to Juiced Technology?s Exact Form Plus add-on, which I?m sure is great, but that costs money that I don?t want to spend, and I think it would be really cool if I could pull this off myself. I?ve been at it all day and I?ve gotten pretty far, but now I?m at a roadblock and need help!
My goal is to embed a child report on my Exact Form (EF), and format it to match the rest of the form. Think of my exact form as a Purchase Order, and the embedded report would be the list of items on the order. (It?s worth noting that once I?ve initially created an EF, I do all my edits directly through HTML using Microsoft Expression.)
Hopefully the rest of this makes sense.......
Method 1:
I was able to get the child report to show on the EF by placing:
~=qdb.GetURL("childDBID", "API_GenResultsTable^query={'36'.TV.'"+ field["Record ID#"]+"'})~
in a text area of my exact form. Functionally, this solves my issue, (the query ensures that only the related child records are shown, '36' is the fid of the Related Record field on the child form, and '"+ field["Record ID#"]+"' is the rid of the parent). The problem with this method though is that the report looks just like it does on Qbase, and isn't anything close to how my exact form is formatted.
Method 2:
I created an HTML version of my child report by using the API_GenResultsTable. Using this method, I was able to get the report to match my EF format PERFECTLY just by adding some CSS to the header of the EF. I used this as a guide to make my html report: https://www.quickbase.com/api-guide/gen_results_table.html
The problem with this method though, is that I can?t figure out how to filter the records so only the related child records show up, so now I have this massive list of unrelated records on my exact form.
Based off of the above, Method 2 is obviously the way to go. So now I need to filter it. I tried to add a query like so:
<s cript lang="javascript" src="https://xcor.quickbase.com/db/chidDBID?a=API_GenResultsTable&jht=1&query={'36'.TV.'"+ field["Record ID#"]+"'}"></script>
in my EF, but it didn?t work at all & just gave me a blank page, so I tried changing it up a few times such as:
&query={'36'.TV.'[Record ID#]'}
&query={'36'.TV.'~Record ID#~'}
But I really can?t figure out how to get the syntax correct. It?s a url reference, but it?s treated as javascript (I think?), so I?m really not sure how to approach it
What am I doing wrong? Is there an easy way to pull the record ID from QB and place it in my query?