Scenario:

A content type with 4 fields. One field is a drop down with 4 values. One field contains another value of say 3, one contains a drop down with a yes and no value. Last field contains a value of say 5
User selects value one from the drop down of the first field. Value one has a numeric value of 2 and so I would like to multiply values of the fields and place them in another field.

In other words be able to do different mathematical calculations on two or more or even one cck fields and stor the value in a seperate field.

I hope this is clear enough. I know nothing about coding so I was wondering if it will be possible to build this into CCK

Since we are on the subject what wouod be the best book to get for learning how to code for Drupal?

Appreciate any help I can get.

Comments

karens’s picture

Status: Active » Fixed

See http://drupal.org/project/computed_field, http://drupal.org/project/views_calc, http://drupal.org/project/views_customfield for some possibilities. It won't be added to CCK since there are modules that do it.

Feature requests are not critical. Discussing how to learn Drupal is way out of scope for the CCK issue queue, but start looking around http://drupal.org/contributors-guide.

vip_sa’s picture

Thank you for the information.

I have tried all the modules that you've suggested and said added the functionality to CCK I am seeking but none of them work. Views_calc give errors and it doesn't work at all and computed field doesn't even show or work. The views custom field does nothing but manipulate the text. It can't do any calculations.

Here is what I wrote on another post regarding computed field not working:

I don't even see the field in the node edit view. How is this supposed to work.

I have a very good suggestion and I really hope someone reads this:

I have no (like in none) interest to start at my age to program in php but since I am now forced because of the lack of good developers for Drupal where I live to start learning php and Drupal development I am going to write a module. I would really appreciate any help with this and even some coding would be highly appreciated.

Here is the plan:

You have CCK!
1. You create any amount of fields (but for our purposes let's say 4 and we name them field_1 and so on)
2. You have a module (the one I'm going to try and write)
3. You have an extra field that you can create (call it field_calc) that you can then select previous created fields and do operations on the fields you've selected. So for instance you have two fields (field_1 and field_2) and you have operations (+ - / * % or your very own entered) and you select the first field (field_1) you select the operation (+) and you select the second field (field_2). Once you create the field and you enter 5 into field_1 and the value 2 into field_2 then the result (which will be seven 5+2=7) will appear in the field_calc on node save.

Then you can display the results in views and if someone can get the views_calc module to work you can calculate the columns too. The possibilities for this are endless

What do you think and will be anybody be interested in helping me? I really hope so I could use any help

vip_sa’s picture

Priority: Critical » Normal
Status: Fixed » Active
bestknight’s picture

Maybe this module will be of interest to you:

http://drupal.org/project/sheetnode