10-04-2022 09:06 PM
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
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?
Thank you for all your input.
Regards,
Marrah
10-05-2022 03:09 AM
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
10-05-2022 04:03 AM
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.
10-05-2022 08:48 AM
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.
10-05-2022 09:22 AM
@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.