Hi Corinne,
How can I limit the export of contacts to a user group?
As Tharuna said there is no direct link between a contact and a user group. There is only a connection with the users via their ID.
The only way I see this work without writing your own code is the following:
- Create a user export including the user group ID and filter the export to include all the user groups that need to be skipped in the contacts export
- Create a contact export including the user_id field. This field can be unpublished if you do not want it in your export file
- Create a skip rule that skips the records matching all the user IDs you exported in step 1. Multiple user IDs have to be comma separated
- Assign the rule to the user_id field of the contact export template
- Run the export, you will get all contacts that are in the usergroups not selected in step 1 because the export will skip all the users set in the skip rule
You can do this for multiple user groups if you need that. Just copy the templates and skip rule and change the filters and skip rule accordingly.
Let us know if that helps.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the
Joomla! Extension Directory