Question
Nationwide building society
Nationwide building society
GB
Nationwide building society
Posted: Mar 27, 2024
Last activity: Jul 5, 2024
Last activity: 5 Jul 2024 7:14 EDT
Closed
Solved
How to delete multiple empty branches(1000+)
Hi All,
In our development environment, we have around 1000+ empty branches which can be deleted.
Could you please tell if there is an utility or a simple approach for deleting multiple empty branches in one go?
Thanks in advance.
Regards,
Alekhya
***Edited by Moderator Marissa to add Capability tags***
To see attachments, please log in.
@AlekhyaP16661996 So the most novel solution to do this is in 3 steps.
1. First get list of all branches in application using the Rule-RuleSet-Branch instance and passing it in D_pzRulesetsForBranch to get list of all rulesets present for each branches.
2.extract the pzinskey of each Ruleset and pass it in D_pzRulesForRulesetVersion[Key:"RULE-RULESET-NAME PRI_BRANCH_RMC-CRM-825"] to get the count of rules.
3. So your algorithm will be if the D_pzRulesForRulesetVersion.pxResult count == 0 then delete the branch using pxDeleteBranch else keep it.
P.S as mentioned below but i have done this already pzBranchesWithContent doesnt work as it gives only branches which have rulesets in it but doesnt query into RSV that it has rule count >0 or not so its not gonna work.
Try out the solution it will work for sure bit of custom work but ya should get the job done.
Regards
Soham C