PDF name to attach a file in Logic Apps email triggered.

  • tangibleit
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

tangibleit created the topic: PDF name to attach a file in Logic Apps email triggered.

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.
#225821
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: PDF name to attach a file in Logic Apps email triggered.

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
#225844
The following user(s) said Thank You: tangibleit
  • tangibleit
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

tangibleit replied the topic: PDF name to attach a file in Logic Apps email triggered.

It´s working now!

Thank you Mihaela.

Juan
#226095
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: PDF name to attach a file in Logic Apps email triggered.

Great!
I'm glad that it works for you.

Best regards,

Mihaela
#226115
  • Posts: 6
  • Thank you received: 0

1987Jan replied the topic: PDF name to attach a file in Logic Apps email triggered.

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");
#237575
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: PDF name to attach a file in Logic Apps email triggered.

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
#237584
Moderators: ForumSupporttomeperica
Time to create page: 0.076 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

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

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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 to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here