Hi.

Is that possible to pass values from a referenced node cck fields into spreadsheet's cells?
All I want to do is:

I've used the sheetnode to make some calculations on the construction of a swimming pool (length, width, depth, material costs etc.).
I've saved my spreadsheet as a template so every time I have to make a new calculation I am creating a sheetnode from template.
Everything works grate and I am really impressed of this. The thing is that I want to pass values from a referenced node's cck field into a cell. Those values are numbers I want to use in my formulas.

Is that possible?

I've tried to fix it by making a view as this has been described on http://drupal.org/node/582544 but I think the fact that I use Arguments and Relationships in my view has not allowed it to work for me.

I already have an alternative for this. But is not what I realy need for this project.

Is there any idea?

I really appreciate the work you've done. This module rocks.
Thanks.

Comments

infojunkie’s picture

Component: Views » Core
Assigned: costas vassilakis » infojunkie

This feature is not implemented right now. It's a useful idea though, I'll work on it soon.

Concerning the view approach, what exactly went wrong?

costas vassilakis’s picture

Hi infojunkie.

Thanks for your direct response.
The problem with the view approach was the argument.

I'll try to make it clear.
As I told you, I use the sheetnode for making calculations on the construction of swimming pools.
The swimming pools are located in different regions. And the company I'm hired for this project wants to calculate among others the cost of workers' traveling and transporting materials. So I need to pass three numbers in my spreadsheet (in specific cells) depending the location of the project.

What I've done so far is:

1) I created a sheetnode (the region spreadsheet nid=46) with the name of the region and those three numbers for each row.
For example A2 = London C2=1 D2=2 E2=2

2) In the swimming pool calculator I use the B3 cell for typing the name of the location (London, New York ect)
and the following formulas for passing the related numbers to the specific cells
For example:
A4 =IF(ISNA(VLOOKUP(B$3, "46"!A1:E120, 3, FALSE))=1, 0 ,VLOOKUP(B3, "46"!A1:E120, 3, FALSE))
A5 =IF(ISNA(VLOOKUP(B$3, "46"!A2:E121, 5, FALSE))=1, 0 ,VLOOKUP(B3, "46"!A2:E121, 5, FALSE))
A6 =IF(ISNA(VLOOKUP(B3, "46"!A3:E122, 4, FALSE))=1, 0 ,VLOOKUP(B3, "46"!A3:E122, 4, FALSE))

I have to tell you that it works. And this is definitely amazing.

The problem is, that this project is supposed to be used from many users (The salesmen).
So it would be very convenient for them to choose the region from a drop down list in order to avoid bad spelling and stuff.

Τhis is where I thought to create a node for each region and a node reference field on the sheetnode content type, making it for them easier to collect the region from a drop down list .

I created a view to collect the referenced data (The name of the location and the related numbers) and I tried to pass them into the specific cells.
For example: "my_views_name"!A2
But this didn't work and sounds very logical.

In my view I have an argument: node:nid -> Provide default argument ->Node ID from URL

That was my question for.
If there was a way to pass this argument to the view and passing back into the cells the values from the referenced node cck fields?

I hope I have made it clear to you. It sounds and it is very complicated.

infojunkie’s picture

It is complicated indeed! But kudos for going this far. Let me see if I understand:

* Salesman creates a new node (corresponding to an order perhaps), with the region specified as a node reference to a location.
* A sheetview collects the information into a spreadsheet. A view argument allows to select just one order given the nid. CCK fields => view fields => sheetview cells.
* A sheetnode is used for cost calculation, referencing the sheetview values. Here, you need to specify the argument given to the sheetview. And that's what's missing.

Is my understanding correct?

costas vassilakis’s picture

Yes. This is exactly what Ι thought as an ideal approach.

infojunkie’s picture

Version: 6.x-1.x-dev » 6.x-1.6-beta2
Status: Active » Fixed

View arguments are supported as of 6.x-1.6.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

costas vassilakis’s picture

Absolutely grate!