Skip to main content
May 9, 2022 7:48 PM UTC
Solved

Grid Configuration - Row Based State Definition

Anyone have success setting up row based state definitions using a grid configuration? 

 

Below is a code snippet of my configuration. I have checked that the column "fieldName" matches the field name below, values in my table the states "value", and that I am able to apply general styling to the grid. (see the commented out style).  Any ideas on what else could be going on?

 

 

 "rows": {
 "selection": "single",
 "defaultSelectedRows": "",
 "minHeight": "30",
 "autoScroll": true, 
 "rowFormatter": { 
 "stateDefinition": { 
 "name": "Entry Difference Indicator",
 "fieldName": "entryDifferenceIndicator",
 "type": "not-fixed",
 "states": [ 
 {
 "name": "Different Entries", 
 "value": "noEquivalentEntry",
 "comparator": "==", 
 "styleName": "rowFormatterStyle" 
 }
 ]
 }
 }
 },
 "styles": {
 "rowFormatterStyle": {
 "backgroundColor": "blue",
 "fontWeight": "bold"
 },
 /*"rowBackgroundStyle": {
 "backgroundColor": "blue",
 },*/
 }

 

May 11, 2022 4:21 PM UTC

Hi Sharon,

 

I ended up copying and pasting code from the service "GetEmployeeConfiguration" on the GridAdvancedExampleServices thing found from the link below, and inserting code specific to my project.  Most likely some typo in my code that I could not find.

 

https://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/index.html#page/ThingWorx/Help/Mashup_Builder/Widgets/AdvancedGridsSamplesFile.html#wwID0ECAX5

2 replies

May 11, 2022 2:14 PM UTC

Hi @travman7777 

 

Can you provide more details on the issue?  What are you trying to do that isn't working as expected?  If you can send some screenshots showing what you want vs. what you are seeing would be helpful.

 

Regards.

 

--Sharon

travman7777AuthorAnswer
May 11, 2022 4:21 PM UTC

Hi Sharon,

 

I ended up copying and pasting code from the service "GetEmployeeConfiguration" on the GridAdvancedExampleServices thing found from the link below, and inserting code specific to my project.  Most likely some typo in my code that I could not find.

 

https://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/index.html#page/ThingWorx/Help/Mashup_Builder/Widgets/AdvancedGridsSamplesFile.html#wwID0ECAX5