Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to check csv column header name in client controller script of the widget?

Virendra K
Kilo Sage

Hi All,

I have requirement to check the attached csv file's 1st column header using client controller script in the widget.

I am trying to use below code and changed the name of the header name of the csv file but its not working.

 

$scope.header = angular.element('#header').val();
        if ($scope.header != 'CI Name' ) {
            alert('VIR ci name passed ');
            $scope.title ="Invalid file format: ";
            $scope.message = "Ensure the 'CI Name' column is the first column in the file.";
            return false;
        }
 
I am not an expert in portal (html/angular script). Please help me to achieve this.
 
Thanks in advance.
 
Regards,
Virendra

  

0 REPLIES 0