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
Solved! Go to Solution.
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.
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.
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.
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.
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
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.
@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
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.
User | Count |
---|---|
93 | |
39 | |
24 | |
20 | |
16 |
User | Count |
---|---|
130 | |
49 | |
47 | |
30 | |
25 |