Hello,
This is a great module! I am using sheetnode as a field in a content type. I am using the drupal function on the spreadsheet to bring in values from fields of the same content type:
=ORG.DRUPAL.FIELD('my_field')
That works great and the correct data is showing up on the spreadsheet. However when I try to add the cells together I run the
=ISTEXT(A1)
function and it indicates that the cell in fact is a text field. When I run:
=LEN(A1)
I can see that it has 183 characters and is in fact a large string, which would explain why:
=VALUE(A1)
will not convert the text to a number.
When I look at the whole cell using
=T(A1)
I notice that the following is inside the cell:
<div class="field field-name-field-course-scale-success-bench field-type-field-reference field-label-hidden"><div class="field-items"><div class="field-item even">12</div></div></div>
Now if I could access that 12, either via regex, or somehow let the spreadsheet no that this is the value I need then I could run calculations in the spreadsheet which would be super. But I am not sure how to go about this. As another note the Drupal field that is being pulled into the spreadsheet is in fact an integer field.

Thanks in advance for any help,
-Asher

Comments

infojunkie’s picture

Category: Support request » Feature request
Issue summary: View changes

Thanks for your report. Turning this into a feature request to support returning raw values in ORG.DRUPAL.FIELD().

joshfromdallas’s picture

I am having the same issue, Did you ever have any luck finding a work around or way to remove the Div tags from the output?

joshfromdallas’s picture

I found a workaround, hopefully it will work everytime.

=(MID(ORG.DRUPAL.FIELD('field_shifthours'),167,1))*B4

Basically just trims the div tags and crap off and returns the value and then I can multiply by another cell for my value.

However, next issue. This works fine in the Edit mode of a Node but when I save if I have it render as a table the whole sheetnode table will not appear :( Any ideas?

pepsimxm’s picture

#3 worked for me - thanks joshfromdallas