Skip to main content
pshashipreetham
19-Tanzanite
Nov 6, 2023 10:58 AM UTC
Solved

Issues with Friendly Names

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,

pshashipreetham
19-Tanzanite
Dec 22, 2023 5:24 PM UTC

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.

Shashi Preetham || +91 8099838801 || shashi@psptechhub.com

6 replies

Emeritus
Nov 9, 2023 7:42 AM UTC
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.
 
Translate
pshashipreetham
19-Tanzanite
Nov 12, 2023 4:51 AM UTC

hi @achirila ,

 

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

 

Thanks

Translate
Shashi Preetham || +91 8099838801 || shashi@psptechhub.com
17-Peridot
Nov 14, 2023 1:32 PM UTC

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.")

Translate
pshashipreetham
pshashipreetham19-TanzaniteAuthorAnswer
19-Tanzanite
Dec 22, 2023 5:24 PM UTC

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.

Translate
Shashi Preetham || +91 8099838801 || shashi@psptechhub.com