Open vk30688-ops opened 3 years ago
I was struggling with an issue similar to this one.
Working: array embedded in the HTML Broken: array loaded into a variable via another script
The console for the broken version pointed to a derived attribute. Derived Attribute functions worked just fine as long as I didn't apply a function to the source attribute.
e.g. "new attribute": function(row){return row["old_attribute"] + ' ' + row["another_attribute"]}
would work
but "new attribute": function(row){return row["old_attribute"].slice(0,3)}
would not.
After a lot of hair pulling I realized that some of my "old_attributes" were coming back as undefined. Once I started checking for that in my functions the issue was resolved.
e.g. "new attribute": function(row){val = row["old_attribute"] ; if ( typeof val != 'undefined' ) { return val.slice(0,3) } }
I am using Pivot.js and my table on display file is
<!DOCTYPE html>
The above is calling gchart_vendor_supp which is data source file. I have observed that hard coded data source file is getting called but with database connected source file, the pivot table does not get displayed. Please help