# Select a group when registering?

**URL:** https://meta.discourse.org/t/select-a-group-when-registering/268854
**Category:** Support
**Tags:** groups, user-custom-fields
**Created:** [June 19, 2023, 6:21am UTC](https://meta.discourse.org/t/select-a-group-when-registering/268854 "2023-06-19T06:21:01Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 22, 2023, 6:31pm UTC](https://meta.discourse.org/t/select-a-group-when-registering/268854/5 "2023-06-22T18:31:00Z")

</div>

I think there’s also an [Automation](https://meta.discourse.org/t/discourse-automation/195773) script that allows you to automatically add people to groups depending on the User Custom Field they select at signup (or whenever depending on how you set it up). For example:

**Create the groups:**

 ![create the groups](https://global.discourse-cdn.com/meta/original/4X/b/7/4/b7452e7041cba063b3161a0e5edb63bdba551c77.png)

  

**Create the User Custom Field:**

 ![example user custom field](https://global.discourse-cdn.com/meta/original/4X/1/a/e/1ae3e431c009a498a5231a130789ecbab420b06a.png)

  

**Create the Automation:**

 ![group-add automation](https://global.discourse-cdn.com/meta/original/4X/8/8/4/884a955f8f4ecdf75a90699cc9a8f85a70cae535.png)

  

**Sign-Up:**

 ![group-add sign-up](https://global.discourse-cdn.com/meta/original/4X/d/f/a/dfa5b15c81a7ddcefe87af1a88640ecef4c8d9ff.png)

  

**See them added to the group:** 🥳

 ![added to custom group](https://global.discourse-cdn.com/meta/original/4X/7/b/c/7bc62001e084e45902c121ac282ec9a17841da89.png)

  

* * *

**Fun quirk…**

If you’re using the ‘Recurring’ trigger rather than ‘User first logged on’ you’ll need to use the `user_field` id rather than the user field name, but you can grab that from the relevant json if you need it `/admin/customize/user_fields.json` (in this case, mine’s 4)

 ![user custom field id](https://global.discourse-cdn.com/meta/original/4X/1/1/e/11e678d0162c2cb64127ebb0ae6ba1b5f6fddf9b.png)

 ![automation - recurring trigger](https://global.discourse-cdn.com/meta/original/4X/f/5/7/f571b584c2f04623c5508943c47393a4060794cc.png)

**NB:** (note the format of the `user_field_4`)

---

_[View the full topic](https://meta.discourse.org/t/select-a-group-when-registering/268854)._
