Forum Discussion

LijaHarris's avatar
Qrew Trainee
4 months ago

Rich Text or URL Formula output Exact Form as PDF for Mobile

I have an exact form and a formula URL on the record's form that displays the data on the exact form template:

var text ID=ToText([Record ID#]);
"" & $ID&"&fullver=1"

For the desktop/non-mobile form users are able to save because the exact form has:

setTimeout(function() {this.print()},3000);

But this does not happen for those using the mobile app, it keeps the user in the QuickBase app and does not easily give an option to ultimately save as a PDF. 

1) is there any code to force the mobile user out of the app and into their browser? or

2) Is there a rich text formula that the mobile user can click on to either save as a pdf? or

3) Is there any pipeline where the exact form is saved as a pdf in the record?

Flexible for any solutions outside of the the above 3

It would be ideal for a pdf/doc to be created but worst case am open to a web browser mobile app friendly solution. Exact Forms Plus would not be an option unfortunately.  Thanks so much!

Lija Harris

1 Reply

  • I can try and answer in chunks - some I'm more confident in than others.

    1) Maybe? The mobile experience tries as hard as it can to keep you in the app more or less - including going to code pages in a kind of browser rendering. I'm not entirely sure if you can force them out of the app though. Google took me here:

    Maybe see if you can test out the URL scheme as it's provided in the post

    2. No - saving as a PDF requires more components than a rich text can provide - your browser and machine in tandem have that capacity but QB alone cannot / does not. 

    3. No - Pipelines is just an API engine without browser capacity to actually render the EF.

    The long and the short is that the Exact Form doesn't really exist except until you load it on your browser. It's your browser that makes it what it is. So that leaves you with (2) options really as I see it barring getting (1) to work.

    Option 1: You could try and expand the Exact Form and leverage HTML2Canvas and jsPDF in tandem to essentially create a PDF out of the rendered HTML on the EF. Users would still need to open the exact form but this would provide a way in the browser window to generate a PDF without the print prompt - giving you some flexibility to test and potentially create the mobile workflow as you've described. 

    Option 2: Create a script that runs a headless browser to log into QB and save the EF as a PDF. There are lots of options for what headless browser you could use - but essentially you would code it to log into QB, open the EF and save as a PDF and upload to QB. 

    Chayce Duncan