cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

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

BhavyaPC
12-Amethyst

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.

ACCEPTED SOLUTION

Accepted Solutions

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
        }
	}
}

View solution in original post

2 REPLIES 2

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
        }
	}
}
BhavyaPC
12-Amethyst
(To:Velkumar)

@Velkumar 

 

Thank you Vel. This code works for me.

Announcements


Top Tags