cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Load a part of documents from Manually trigger

 

Cattura.PNG

 

Hi all,

I need a advice from you,

I've got a partner that load day by day some documents, for example

 

day 1, he load 3 documents

day 2, he load 5 documents

day 3, he load 1 document

 

I need that these documents will be stored in a SharePoint folder

how can I solve this?

I put, for example, 5 fields where he can upload documents, but if he one day upload 2 documents the flow broke

 

how I can load a not definite number of documents?

 

thanks for your support

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Load a part of documents from Manually trigger

Hi @pasquale_p,

 

You could convert the triggerBody into string, then use "contentBytes" as separator convert it into an array by using split() function, then use length() function to get the length of array. After all, length of array sub 1, the length will be number of uploaded.

Annotation 2020-06-18 151850.jpg

 

 

sub(length(split(string(triggerBody()),'contentBytes')),1)

 

(Screenshot is not correct, I resubmit it, sorry)

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Load a part of documents from Manually trigger

Hi @pasquale_p,

 

You could convert the triggerBody into string, then use "contentBytes" as separator convert it into an array by using split() function, then use length() function to get the length of array. After all, length of array sub 1, the length will be number of uploaded.

Annotation 2020-06-18 151850.jpg

 

 

sub(length(split(string(triggerBody()),'contentBytes')),1)

 

(Screenshot is not correct, I resubmit it, sorry)

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: Load a part of documents from Manually trigger

Hi @v-litu-msft, thanks for your support,

 

I'm new on Power Automate, so, after creating the manual trigger for upload documents, I add new steps "compose" for each upload field, or one time?

 

thanks a lot for your support

Pasquale

Highlighted
Community Support
Community Support

Re: Load a part of documents from Manually trigger

Hi @pasquale_p,

 

The compose action just a process of carrying expressions, and it's a good data acceptance container.

At the step, you just need to create it once.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Frequent Visitor

Re: Load a part of documents from Manually trigger

@v-litu-msft, my last last question,😃

 

if my partner upload 3 files of 6 possibilities

the process will be now:

 

MANUAL TRIGGER -->COMPOSE 1 --> COMPOSE 2 --> CREATE FOLDER --> CREATE FILE1 --> CREATE FILE2 -->CREATE FILE3 --> CREATE FILE4 --> CREATE FILE5 --> CREATE FILE6

 

thank you for your support

 

Highlighted
Community Support
Community Support

Re: Load a part of documents from Manually trigger

Hi @pasquale_p,

 

If you have 6 create file actions but only three files received, the Flow will run first three create file actions, then it will report error and stop.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (10,388)