How to work with custom primitive data when material has multiple slots?

Understood, thank you very much! Is this solution works only with blueprints?