Hi Guys, 

I need a hind! 

I´d like to create a picking list out of OutSystems. 

The use case is: 

On daily basis a user needs to pick some goods and label them. All the goods are in a table record. The goods also contain a PDF label in the entity records (goods entity and goods file entity are a 1:1) 

I want the user to click a download button and then download all the label from the table record at once. 

I tried this with a "for each" but as download is an "ending action" I cannot cycle it... 

Do you have any Ideas how to download more than one pdf at once? 


Thank you and best regs! 

Tobias

BigSlikTobi wrote:

Hi Guys, 

I need a hind! 

I´d like to create a picking list out of OutSystems. 

The use case is: 

On daily basis a user needs to pick some goods and label them. All the goods are in a table record. The goods also contain a PDF label in the entity records (goods entity and goods file entity are a 1:1) 

I want the user to click a download button and then download all the label from the table record at once. 

I tried this with a "for each" but as download is an "ending action" I cannot cycle it... 

Do you have any Ideas how to download more than one pdf at once? 


Thank you and best regs! 

Tobias


Hello BigSlikTobi,


You can create a separate action to download what you need, and on the screen action to cycle for.

best regards,


Jorge Rodrigues

Jorge Rodrigues wrote:

BigSlikTobi wrote:

Hi Guys, 

I need a hind! 

I´d like to create a picking list out of OutSystems. 

The use case is: 

On daily basis a user needs to pick some goods and label them. All the goods are in a table record. The goods also contain a PDF label in the entity records (goods entity and goods file entity are a 1:1) 

I want the user to click a download button and then download all the label from the table record at once. 

I tried this with a "for each" but as download is an "ending action" I cannot cycle it... 

Do you have any Ideas how to download more than one pdf at once? 


Thank you and best regs! 

Tobias


Hello BigSlikTobi,


You can create a separate action to download what you need, and on the screen action to cycle for.

best regards,


Jorge Rodrigues


Hi Jorge,


I cannot use download in a server action. And I also cannot use a screen action in another screen action... or can I? Where shall I create this seperate action?


Best regs

Tobias 

Hi,

Instead of downloading multiple files at once you should create zip of all PDF files and download that zip.

You have to use zip extension (add depedency of this extension in your module) to create the zip and below are the steps you have to follow:

  1. Call CreateZip server action of the zip extension. It create an inmemory zip file
  2. Loop through all you pdf content list and get its binary data.
  3. Add pdf binary data to zip by calling AddFile server action of zip extension.
  4. When all pdf files are added to zip call CommitChanges server action of zip extension
  5. Call GetZipBinary server action from zip extension
  6. Use download node and assign output of GetZipBinary action in the filecontent property of download node. Set zip file name.


Nikhil Gaur wrote:

Hi,

Instead of downloading multiple files at once you should create zip of all PDF files and download that zip.

You have to use zip extension (add depedency of this extension in your module) to create the zip and below are the steps you have to follow:

  1. Call CreateZip server action of the zip extension. It create an inmemory zip file
  2. Loop through all you pdf content list and get its binary data.
  3. Add pdf binary data to zip by calling AddFile server action of zip extension.
  4. When all pdf files are added to zip call CommitChanges server action of zip extension
  5. Call GetZipBinary server action from zip extension
  6. Use download node and assign output of GetZipBinary action in the filecontent property of download node. Set zip file name.



Hi, 

thanks for this good Idea! 

But actually I direktly want to open the PDF and print them with a label-printer. Having a zip to unzip it first would disturb the user-experience.

So the output shall be a pdf with all files in it.


Where do you have these PDF files in your application.

  1. Stored as file?
  2. Date is in entities and you are fetching it and generating PDF?
  3. Printing Screen content to generate PDF?