Skip to main content
Apr 10, 2019 10:48 AM UTC
Solved

Is there any way to identify empty values from each row of a infotable?

Hi,

 

 

I'm trying to identify missing values from a each entry of an infotable, Field values of input infotable are dynamic. 
I need to find the count of missing values from each row and also the field names.

Anyone please give me some idea to do this.

VelkumarAnswer
Apr 10, 2019 1:37 PM UTC

Hello @BhavyaPC 

 

I have created small script to iterate over infotable and field definition, try this script

 

var infoTable = YOURINFOTABLE;
var dataShapeFields = YOURINFOTABLE.dataShape.fields;
for (var i = 0; i < YOURINFOTABLE.length; i++) {
	for (var fieldName in dataShapeFields) {
 if(YOURINFOTABLE.rows[i][fieldName] == null )
 {
 // Add your field, row and count in Infotable or array
 }
	}
}

2 replies

VelkumarAnswer
Apr 10, 2019 1:37 PM UTC

Hello @BhavyaPC 

 

I have created small script to iterate over infotable and field definition, try this script

 

var infoTable = YOURINFOTABLE;
var dataShapeFields = YOURINFOTABLE.dataShape.fields;
for (var i = 0; i < YOURINFOTABLE.length; i++) {
	for (var fieldName in dataShapeFields) {
 if(YOURINFOTABLE.rows[i][fieldName] == null )
 {
 // Add your field, row and count in Infotable or array
 }
	}
}
BhavyaPCAuthor
Apr 11, 2019 5:11 AM UTC

@Velkumar 

 

Thank you Vel. This code works for me.