Check if available values of a list-field is already used by other node of content type i have a problem regarding fields of type list.

The scenario is the following. I have a content type with several fields, among them a field of type list. This field have 3 values ("1" to "3"). I want any of those 3 values to belong only in ONE node of this specific content type. 

In other words, if a node of that content type has the value "1" in that field, i want that value to be "disabled" when creating new nodes of that content type (so, only available options to be "2" and "3").

Do you have any ideas? Is it possible at all? 

Thanks in advance!
you need to build a custom module in which you implement hook_form_FORM_ID_alter. since we're dealing with node create/edit forms, try yourmodule_form_yourcontenttype_node_form_alter(). 

(you could go for hook_form_alter(), but that would yield less performance, especially since you have a query to run.)

your implementation should include a query for that specific field, probably the table field_data_field_yourfield. narrow it by bundle and if it returns any entity_id, that's the one you're filtering out of your dropdown. 

here's a few links to help you sort things out: 


function hook_form_FORM_ID_alter():
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_FORM_ID_alter/7.x
function db_select(): https://api.drupal.org/api/drupal/includes!database!database.inc/function/db_select/7.x
also look up "D7 Form API reference" (I can't post more than two links atm, sorry)


please write back if it works. good luck!

cheers, 
Luco