Closed (won't fix)
Project:
Rules
Version:
6.x-1.1
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2009 at 12:57 UTC
Updated:
1 Jun 2012 at 20:40 UTC
I am trying to achieve the following: when someone tries to create a node with a CCK field that already has that value in another node, the creation of this duplicate node is cancelled, and then something happens (eg a +1 vote) to the original node.
For instance if there is a node with "Track" CCK Field with value "Eye of the Tiger", and someone attempts to create another node with "Eye of the Tiger" as the "Track" value, he isn't allowed to create that node, and instead, "+1" is added to the original "Eye of the Tiger" node.
Can anyone help me please? Any solutions? I know Voting API doesn't integrate with Rules yet, but I'm more concerned with getting the trigger sorted...
Thanks.
Comments
Comment #1
joecanti commentedIm trying to do a similar thing - I think the way to go is to add a numerical field to your content type, then use the 'populate field' rule plus some custom php to add 1 to that field if the rule is used. You could also add a rule to display a message 'this track has already been added'....
Joe
Comment #2
kim-day commentedI need this functionality too and am considering writing a php snippet to query the field values for previously saved nodes to determine if the value about to be saved duplicates an already existing entry. Does anyone know a better way to accomplish this?
Comment #3
mitchell commentedBecause this issue hasn't been updated recently, I'm closing it to clear up space in the issue queue. However, if you would still like to submit another support request or help answer other support requests, your efforts would be welcomed and appreciated. If you already found an answer, you can update the Rules documentation. If not, you may find that a recent update to the docs has provided more information, or that another issue has been fixed that you can find using the issue queue search tools.