How To Delete First 100 Tags From Firebase

Hey Respected Koders…,

I’m Trying To Delete First’ 100 Tags When Something Event Happen

Help Me To Delete First’ 100 Tags Of Project Bucket

First get all the tag of that bucket by using GetAllTagList block then insert the value in a list. Then use a for each number loop block from 1 to 100 and use the Firebase’s ClearTag block give the tag by using select list item block (list = tag list and index=get number). And your first 100 tags will be deleted.

@Mr.Arshad.In , here are my blocks

I haven’t tried these blocks but it will work…

2 Likes

Beforehand, make sure the list is greater than or equal to 100.

2 Likes

Hey @iamwsumit Its Working But The Tags Was Deleting Randomly Not 1 to 100 Particularly

Yes this is happening cause when you add new tags in firebase it is sorted out in ascending order. (Only in firebase database) but when you call tag list then it is not sorted out in ascending order. Maybe try to sort list tag list prior and then delete the first 100

2 Likes

Actually Its In Sort Wise @dora_paz

sort

yes in firebase but what about app ?

1 Like

Hey Thanks Respected Koder @dora_paz Its Working :heart:

1 Like

OK, I have an idea for you.

The “target” variable can be changed to whatever number you want, and it will delete every tag below that number, but also including that number.

This idea makes sure that even if the tags aren’t stored in order from the application, it will still work.

1 Like

Actually I Did This Simply With Sort Addon Extenion

Thanks For This Tooo @hammerhai Respected Koder :heart:

Just to interest you some more, the amount of blocks that my idea uses is less than using the extension!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.