cancel
Showing results for 
Search instead for 
Did you mean: 

Worksheet Writer - Cannot lookup a property on a null value

marenas
Contributor

Hello!

I am having an issue with the Worksheet Writer snap. As you can see below the Mapper snap has output value for $date_of_this_report field
Mapper

but when I map this to the Worksheet name, the snap returns ‘Cannot lookup a property on a null value’ error. Did I miss anything?

Worksheet Writer_Snap

Thank you for all your input.

Regards,
Marrah

4 REPLIES 4

SL12345
New Contributor III

Hi, when i have a problem with null value, i use ‘get’ mehod - maybe try this one: value for Worksheet Name + '_' + $.get('date_of_this_report',' ') will solve your problem

The $.get() function is very useful but you should be extra careful when you’re using it. Example $.get(‘date_of_this_report’) will get the value of the field if the field is present in the incoming data, but if not, it will pass null as a value. The $.get('date_of_this_report',' ') will pass empty string if the field is not present, so is that what you need?

I believe the issue is in the streaming data. In one or multiple objects this field is missing. I would start from there.

Hi,

Unfortunately, this does not solve my issue.

@bojanvelevski, to answer your question, the field is always present in the incoming data and I don’t want to assign a null or pass an empty string. I replicate the pipeline this time using JSON generator. It is still throwing the same error.

JSON Generator

2022-10-05_11h43_17

smudassir
Employee
Employee

@marenas , we do not support upstream values for worksheet name in the worksheet writer snap. You can use only pipeline params in the expression. The reason for not supporting upstream values are below:
- all data will not be written to single worksheet
- different rows can go to different worksheets, and this isn’t a good design.

Its only Worksheet Reader that can accept upstream values.