Skip to main content
Nintex Community Menu Bar
Answer

Query list action - I need all files within a known folder

  • August 14, 2020
  • 8 replies
  • 549 views

Forum|alt.badge.img+5

Hi guys,

 

I need your help for a list workflow in SharePoint Online which is able to query a folder with a unique name inside a library, which shouldn't have any subfolders, only documents in it.

 

As result I would like to have all the documents (URLs of those documents in a collection variable would work) which are in the subfolder "XYZ".

 

Can anybody help me out with this?

Best answer by ohrenstoepsel

Ok, I managed to solve it myself using some tips from the community. Attached you can find a component workflow which does the job for me for 10 possible attachments in each folder.

8 replies

Forum|alt.badge.img+5
  • Author
  • Answer
  • September 25, 2020

Ok, I managed to solve it myself using some tips from the community. Attached you can find a component workflow which does the job for me for 10 possible attachments in each folder.


Forum|alt.badge.img+2

Can you show a picture how you have done it?
I could not import that workflow to our server workflows.

There nwp does not work.

 

Thank you

Dagmar


Forum|alt.badge.img+5

I attached all workflow actions in numbered screenshots. I hope this helps. If not just ask your questions. Remember I use it as a component workflow on my main workflow to keep things tight. That's maybe the reason you cannot import my nwp-file because in an Office 365 Tenant this should work...


Forum|alt.badge.img+2

Thank you
I will try that 🙂


IszNintex
Forum|alt.badge.img+1
  • Rookie
  • October 8, 2023

Can you please share your workflow? Somehow, I can’t look at the images that you share. It shows me blank. I also need to get all the files in the SharePoint Online folder and email out all the files as attachments. Thank you in advance.


IszNintex
Forum|alt.badge.img+1
  • Rookie
  • October 11, 2023

@ohrenstoepsel Can you please show me how you do this? I need to get all my files in the SharePoint folder and attach them to an email. Thanks.


Forum|alt.badge.img+3

So I haven’t figured out how to query files in a folder, but figured out a work around if you are also storing those files into a folder in your workflow.  

I created a text column in my document library which I named Workflow ID.  

After I save the files to the folder in my workflow, using the stored file itemID, I set the Workflow ID column to the workflow instance id context variable.  

My query a list action then queries the Workflow ID column where it equals the workflow instance id context variable.

Hope this helps a few people.


IszNintex
Forum|alt.badge.img+1
  • Rookie
  • October 31, 2023

@anissa_divincen Thanks for your reply. I had figured out the same way as you are. I added a column with my folder’s name, and when I query the files, I just added a condition. Everything works as I expected. Thanks again.