is a subscription center that receives the preferences in 5 variables per publication list as shown in the image, and from these preferences, it subscribes or unsubscribes the user from the publication lists.
I have a backend that reads me the 5 variables of an option and I make the logic to put a number to the field _enterpriseattributte, and with that number I subscribe or unsubscribe from the publication lists.
For now I use it for one of the options that in this case would be a publication list and I want to reuse that code for all the publication lists. I don't know if there's a function to reuse the backend
since from the fronted it sends 30 variables with all the publication lists [![enter image description here]]