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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to compare two infotable fields

Velkumar
19-Tanzanite

How to compare two infotable fields

Hello all,

 

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

 

Thanks,

VR

ACCEPTED SOLUTION

Accepted Solutions

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.

 

 

View solution in original post

4 REPLIES 4

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

Velkumar
19-Tanzanite
(To:CarlesColl)

Hello @CarlesColl,

 

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

 

Regards,

VR

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.

 

 

slangley
23-Emerald II
(To:CarlesColl)

Hi @Velkumar.

 

If the response provided by @CarlesColl answered your question, please mark it as the Accepted Solution for the benefit of others who may have the same question.

 

Regards.

 

--Sharon

Announcements


Top Tags