Skip to main content
1-Visitor
April 10, 2019
Solved

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

  • April 10, 2019
  • 2 replies
  • 2381 views

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.

Best answer by Velkumar

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

Velkumar19-TanzaniteAnswer
19-Tanzanite
April 10, 2019

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
 }
	}
}
BhavyaPC1-VisitorAuthor
1-Visitor
April 11, 2019

@Velkumar 

 

Thank you Vel. This code works for me.