Display number of files within folder

Hello,

i am creating a function where users can create folders, and then input files into them.
I have a folder data type and a file input type.

On the folder “dashboard” it showcases the folders for each user in a repeating group, but i want to have a little number under each name where users can see the total number of files within each folder.

How would i accomplish this when i have 2 data types for files and folders?

Just get the count of the files for the given folder (or store the count on the folder datatype)

what ive tried to do, i can get it to show EVERY file made by the user, using the “search for” dynamic thing, but i need some help only showing only files in each specific folder

Just refer to the folder’s files - or the files from the folder, depending on how you’ve set up your database.

I just have 1 file and 1 folder datatype. I think the issue is, that in each folder-“page” i have a repeating group showing the files for each - which i cant really figure out how to set up so it ONLY shows files from that “parent” folder

How are your folders and files connected?

I have a “file” - list of files field. I can see in the app data that nothing is added to that when i create a new file, i don’t understand why

added this to workflow and it works now, is that the way to do it or is there a better way?

That’s one way to do it, yeah. The other way is to do it the other way round (i.e. have a Folder field on the File)…

Which is better? It really depends on a whole number of factors…

for now this is fine, more of an MVP this app, i appreciate the help :smiley:

1 Like