Skip to main content
pshashipreetham
18-Opal
18-Opal
November 6, 2023
Solved

Issues with Friendly Names

  • November 6, 2023
  • 2 replies
  • 2552 views

Hi,

 

I have a Data shape with Friendly Names, I have an infotable where I have renamed the columns as per the Fields of the DataShape which has the Friendly Names and is assigned to the result(a infotable which is created based on the DataShape which has the Friendly Names).

When this is done, friendly names are not getting applied on the Runtime.

 

Thanks,

Best answer by pshashipreetham

Hi, 

 

 I found an exciting learning when I was debugging this issue. When we convert the Infotable to JSON, There will be Sub JSON with DataShape, where you can see the below details of the fields in the JSON:
1. Friendly Name

2. Ordinial

3. Name

4. description

... etc 


So, we can convert the info table to JSON, update this information like the normal field, and convert it back to the Info table. So that in the result, you will see the proper one as you wanted.

The infotable I am getting doesn't have the Friendly Names. Even if I have renamed the Fields based on the Output Infotable Datashape, it will not show up since the JSON has no Friendly Name.

 

Thanks.

2 replies

5-Regular Member
November 9, 2023
Hi @pshashipreetham,
Thank you for your question.
I encourage you to bring more details and context to your initial inquiry. This will make it easier for you to receive meaningful help from other Community members.
 
pshashipreetham
18-Opal
18-Opal
November 12, 2023

hi @achirila ,

 

That's the whole query, can't explain more than that 🙂

 

Thanks

16-Pearl
November 14, 2023

Where do you expect to see the friendly names in runtime would be one question. E.g. as Grid Headers? Or where?

I actually do not know what the feature behind "friendly names" exactly is.

 

I only found out that it seems to use the friendly name in composer-result view:

DataShape with a property "FieldName" and a friendlyname set:

nmutter_1-1699968625413.png

Service output result shows "Friendlyname" as header:

nmutter_0-1699968611992.png

Mashup only shows "FieldName"

nmutter_2-1699968708936.png

 

Not sure of the intended use of "FriendlyName"-feature.

Edit: In the docs I only found that this widget makes use of friendlynames in runtime: https://support.ptc.com/help/thingworx/platform/r9/en/?#page/ThingWorx/Help/Mashup_Builder/Widgets/PropertyDisplayWidgetThemable.html (if you search for "friendly name" on the page you find "If the field has a friendly name defined in the Data Shape definition, this name is used.")

pshashipreetham
18-Opal
pshashipreetham18-OpalAuthorAnswer
18-Opal
December 22, 2023

Hi, 

 

 I found an exciting learning when I was debugging this issue. When we convert the Infotable to JSON, There will be Sub JSON with DataShape, where you can see the below details of the fields in the JSON:
1. Friendly Name

2. Ordinial

3. Name

4. description

... etc 


So, we can convert the info table to JSON, update this information like the normal field, and convert it back to the Info table. So that in the result, you will see the proper one as you wanted.

The infotable I am getting doesn't have the Friendly Names. Even if I have renamed the Fields based on the Output Infotable Datashape, it will not show up since the JSON has no Friendly Name.

 

Thanks.