Dynamic data attachment not working

Welcome to the community, @alvarees! Maybe you will need first to try out using the sample XLSForms shared in this support article:

You can customize your XLSForm later after you understand how the dynamic data attachment features work.