We have users U1, U2 ..etc and Other AnyType Classes as well. We created a group G1 associated to resource R1 as a dynamic group with rule to dynamically make Users/AnyObjects based on a schema attribute on the respective type. When we provision members on G1 and then verify membership by going to 'members' option on G1, we can see the membership established for U1.
But when we have a mapping on a resource R1 with internal attribute - groups[G1].schemaAttribute mapped to any external attribute example groupname, the groupname always comes through as empty. We see the membership established in syncope but the group schema attribute value does not flow as per mapping.
The same above mapping works if G1 is a static group and U1 is made a member of G1 then we can see the mapping value for groups[G1].schemaAttribute flow into groupname and thus allow scripts to perform any action based on the mapped group attribute.