Search Gallery Asset Field

6 years 4 months ago #300183 by Spiralmind
Search Gallery Asset Field was created by Spiralmind
Hello, I am not able to find this answer in the documentation or the primer.

I have a single document that is needed each year by each member and needs to be deleted each year before they renew. I have come up with 2 scenarios but cannot figure out if the Gallery Plugin search for Asset will work for mass deletion of this single file. I do not want to go though each user one at a time to delete the file.

So option one:
Use a upload file field which renames the file when uploaded and places it in the plug_cbfilefield folder under each user's ID folder. This is doable but the issue is if I delete the file in the server folder the file still says it's on the page. Clicking it says file not found. So it's a DB entry not the actual file. Even with this I must go through each folder and delete them one at time.

Option two:
Create a single gallery for uploading one file using the limit and then deleting them all at once in the gallery plugin list. However I don't know to filter them so I can delete them all at once. They can upload any file name so I cannot search by that, no way to rename a file in a gallery? I thought using a dedicated gallery would give me the option to search by Asset using the gallery asset but that does not work. I need to add the user id and asset for it to show anything. Can't I just use the gallery asset in the search to only show files in that gallery from all users? Then I could delete them all in 2 clicks.

I suppose I could just make a new field each year for this upload which should remove the file from the users profile edit. This would seem to pile up all the files though and after some time could be an issue.

Any other ideas how to accomplish this would be nice.

Thank you

Please Log in to join the conversation.

6 years 4 months ago #300184 by krileon
Replied by krileon on topic Search Gallery Asset Field
The filters under "Search Tools" are for exact matches. You can partial match the asset using the search input next to the search button. For example I can search ".uploads" and should find all entries with that in their title, description, asset, etc.. just be sure your asset is specific enough for you to do partial matches.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: Spiralmind

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.220 seconds

Facebook Twitter LinkedIn