I have a unique CCK value (Product ID) that I've assigned to each node. Rather than use node title, which can be the same--or node ID, which has no inherent meaning for me--I would like to use node reference to refer to the node via the unique CCK value.

Is this possible? Or is there an easier way to do this?

Comments

nevets’s picture

You can create a view that list the product ids and use the view to determine the list.

Anonymous’s picture

Status: Active » Closed (fixed)

Ah, okay, I got it.

earthangelconsulting’s picture

I am having a similar problem. I tried creating a simple view (with "unformatted" as the style, and "fields" as the row style) to use to display the autocomplete results in a cck nodereference control. it worked, but only for displaying them... as far as i can see, the fields in the view are not being searched as you type in text, it is ONLY looking at the title text and no other.

is there a way to have the fields in the view also searchable via autocomplete?

cheers
Peter 'Fish' Fisera
Earth Angel Consulting

earthangelconsulting’s picture

Status: Closed (fixed) » Active

not sure if this is the right way to handle this, but i have changed the status back to "active". maybe this issue was closed as far as Jyorraku is concerned, but IMHO the thread doesn't contain enough detail to really tell others how to fix this.

or should i be posting this as a new issue? i'm not sure of the correct procedure here. the issue queue handbook doesn't seem to cover this :-)

cheers
Fish

MBroberg’s picture

Well, technically the original question and title of the issue is now answered.
But here is it in more detail:

When setting up your content type, for a node reference field, you can use a View to determine the list of nodes you can reference.
Under "content types that can be referenced," instead of checking boxes, use the "advanced" settings.
In that view, you can set up whatever fields you want, and they will show up in the dropdown.

However, in using autocomplete, you cannot search on anything but the node title, even if other fields appear in the dropdown.
And that should be a separate request (perhaps it already is?)