Answers.Body: <p>You can use the <a href="https://www.drupal.org/project/views_civicrm_expose_tables" rel="nofollow noreferrer">Views CiviCRM Expose Tables</a> module to join to CiviCRM tables and columns that aren't otherwise exposed.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-01T22:13:38.383Z
Answers.Text: Thanks Jon. I might try that if I could figure out how to use the module! But after install, I don't see any links to it and clicking on the configure link in modules just takes me to the main views screen. However, the table is already joined somewhere because it's getting the list of options when I add it as an exposed filter.
Answers.UserDisplayName: pmoz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-11T14:07:38.063Z
Answers.LastActivityDate: 2020-09-11T14:07:38.063Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I have a custom select option field with about 35 options.
  I'd like to be able to sort the field in Drupal Views by weight instead of value or name.</p>
  <p>I looked around for the views integration in the core files but couldn't find the section that exposes custom field option groups to views.</p>
  <p>I would assume that it is in all/modules/civicrm/drupal/modules/views/components/civicrm.core.inc but I don't see any mention there.</p>
  <p>Custom option groups appear to be exposed in all/modules/civicrm/drupal/modules/views/civicrm.views.inc but I don't see any mention of the option_value table to add the weight column.</p>
  <p>Any suggestions on how to expose the weight of individual custom select options in Views?</p>
  <p>Thank you!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-10T23:53:31.463Z
Comments.Text: it may be evident based on your links but worth being clear if D7 or D8
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-11T03:37:38.190Z
Comments.Text: This particular install is D7.
Comments.UserDisplayName: pmoz
Tags: <custom-fields><drupal-views><drupal-7>
Title: How would I expose weight for a custom select field to Drupal Views for sorting?
ThreadText: # How would I expose weight for a custom select field to Drupal Views for sorting?
  
  (Asked by: username_0 on 2020-09-10)
  
  I have a custom select option field with about 35 options.
  I'd like to be able to sort the field in Drupal Views by weight instead of value or name.
  
  I looked around for the views integration in the core files but couldn't find the section that exposes custom field option groups to views.
  
  I would assume that it is in all/modules/civicrm/drupal/modules/views/components/civicrm.core.inc but I don't see any mention there.
  
  Custom option groups appear to be exposed in all/modules/civicrm/drupal/modules/views/civicrm.views.inc but I don't see any mention of the option\_value table to add the weight column.
  
  Any suggestions on how to expose the weight of individual custom select options in Views?
  
  Thank you!
  
  **Tags:** custom-fields, drupal-views, drupal-7
  
  > **Comments:**
  > **username_1**: it may be evident based on your links but worth being clear if D7 or D8  
  > **username_0**: This particular install is D7.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-09-11. Score: 0
  
  You can use the [Views CiviCRM Expose Tables](https://www.drupal.org/project/views_civicrm_expose_tables) module to join to CiviCRM tables and columns that aren't otherwise exposed.
  
  > **Comments:**
  > **username_0**: Thanks Jon. I might try that if I could figure out how to use the module! But after install, I don't see any links to it and clicking on the configure link in modules just takes me to the main views screen. However, the table is already joined somewhere because it's getting the list of options when I add it as an exposed filter.  
  
  ---
  
  