TOPIC:

PDF name to attach a file in Logic Apps email triggered. 5 years 5 months ago #225821

  • Topic Author
  • tangibleit
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 6
  • Thanks: 0
Hello

Im using an Azure Logic Apps flow to take form data from the table facileforms_records and send an Approvals request by email. I need to attach a pdf to show details to the users and i can see Breezing Forms can upload on the fly the pdf file of the form to Dropbox. Logic Apps has a connector to work with Dropbox but i need to know the name of the file created to attach it so, my question is: Is there any table where you record the filename uploaded to Dropbox service? if not, Where can i rename the file uploaded to dropbox?

Thank you.

Please Log in or Create an account to join the conversation.

PDF name to attach a file in Logic Apps email triggered. 5 years 5 months ago #225844

  • mihaela
  • Offline
  • User is blocked
  • User is blocked
  • Registered
  • Posts: 3128
  • Thanks: 416
Hello,

The name of the pdf file uploaded to Dropbox service is not saved to a table in database.
You can change the name of pdf files generated for a specific forms if you follow this instructions:

Go to \components\com_breezingforms\ and open the file facileforms.process.php.
Around line 5129 you have to replace this code:
$pdfname = $this->uploads . '/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
with this one:
if($this->formrow->name=='formname'){

                    $pdfname = 'wantedname.pdf';
                    }
                    else{
                $pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
            }
If you want to apply the change to all forms, you don't need the if statement. In that case just change the $pdfname variable.
NOTE: This will give the same name to all the pdf-files so only the first pdf-file will be saved to dropbox and others wont't because they will have the same name. That is why I suggest that you use something like this:
$recnr=$this->record_id ;
$pdfname = 'wantedname_' . $recnr . '.pdf';
This will add the number of that record to the end of the pdf-file name, for example, wantedname_25.pdf and, since you know the record id from facileforms_records table, you will know which pdf file to look for for a specific record.

I hope that will work for you. Let me know if that is what you wanted to achieve?

You could also create a new table in your database which would have two rows, one containing record unique id, and another one containing pdf-file name. But the first solution is simpler.

If you have more questions, feel free to ask.

Regards,

Mihaela
The following user(s) said Thank You: tangibleit

Please Log in or Create an account to join the conversation.

PDF name to attach a file in Logic Apps email triggered. 5 years 5 months ago #226095

  • Topic Author
  • tangibleit
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 6
  • Thanks: 0
It´s working now!

Thank you Mihaela.

Juan

Please Log in or Create an account to join the conversation.

PDF name to attach a file in Logic Apps email triggered. 5 years 5 months ago #226115

  • mihaela
  • Offline
  • User is blocked
  • User is blocked
  • Registered
  • Posts: 3128
  • Thanks: 416
Great!
I'm glad that it works for you.

Best regards,

Mihaela

Please Log in or Create an account to join the conversation.

PDF name to attach a file in Logic Apps email triggered. 4 years 3 weeks ago #237575

  • 1987Jan
  • Offline
  • Premium Member
  • Premium Member
  • Registered
  • Posts: 216
  • Thanks: 1
Bei mir klappt das leider nicht. Mach ich etwas verkehrt o.O
mt_srand();
        if($this->formrow->name=='formname'){

        $recnr=$this->record_id ;
		$pdfname = 'wantedname_' . $recnr . '.pdf';
                    }
                    else{
                $pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
            }
		$pdf->lastPage();
        $pdf->Output($pdfname, "F");

Please Log in or Create an account to join the conversation.

PDF name to attach a file in Logic Apps email triggered. 4 years 3 weeks ago #237584

  • mihaela
  • Offline
  • User is blocked
  • User is blocked
  • Registered
  • Posts: 3128
  • Thanks: 416
Hello,

I hope that we can continue in English since we don't have a German-speaking support staff member at the moment.

In order for this to work for your form, you have to replace formname in the code with the Name of your form for which the name should be changed.

Let me know whether you have managed to make it work.

Regards,

Mihaela

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.060 seconds

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Subscribe to news and updates!

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!