Skip to main content
19-Tanzanite
September 3, 2018
Solved

How to compare two infotable fields

  • September 3, 2018
  • 4 replies
  • 2556 views

Hello all,

 

Can anyone tell me, how to compare two infotable fields are same ?

 

Thanks,

VR

Best answer by CarlesColl

Ok, then you need to recover Infotable definition fields, to do that you can use the following code:

 var fields ;//
 if ((infotable.dataShape==null)||(infotable.dataShape==undefined)) {
 fields = infotable.ToJSON().dataShape.fieldDefinitions;
 } else {
 fields = infotable.dataShape.fields;
 }

Than you do for both infotables, and check if they have the same fields.

 

 

4 replies

1-Visitor
September 3, 2018

What does you mean with two infotable fields? All the rows for the same field name or what?

Velkumar19-TanzaniteAuthor
19-Tanzanite
September 3, 2018

Hello @CarlesColl,

 

I want to compare whether both Infotable have same field's. We are not comparing rows.

 

Regards,

VR

1-Visitor
September 3, 2018

Ok, then you need to recover Infotable definition fields, to do that you can use the following code:

 var fields ;//
 if ((infotable.dataShape==null)||(infotable.dataShape==undefined)) {
 fields = infotable.ToJSON().dataShape.fieldDefinitions;
 } else {
 fields = infotable.dataShape.fields;
 }

Than you do for both infotables, and check if they have the same fields.