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

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Auto Refresh Doesn’t Update CellWidthField in ThingWorx Collection Widget (ThingWorx 9.3.3)

GABRYEL25770
12-Amethyst

Auto Refresh Doesn’t Update CellWidthField in ThingWorx Collection Widget (ThingWorx 9.3.3)

Hello all,

I am using the Collection widget in ThingWorx 9.3.3 to display a group of two mashups with different colors to simulate a percentage bar. I have nine simulated percentage bars like this, each separated by different containers in the main mashup.

On the main mashup, I am executing a service every 30 seconds using Auto Refresh. The data from this service should set the width of the mashups using the "CellWidthField" property in the Collection.

 

GABRYEL25770_0-1750945255565.png

I know that the Auto Refresh is working because I can see the percentage values updating every 30 seconds. However, the width of the mashups does not change accordingly, it only updates when I manually refresh the page. As you can see in the first image, the second percentage bar (which is 100% and red) should fill the entire row like the first one.

GABRYEL25770_1-1750946491923.png
The second image shows the correct behavior, but only after a manual page refresh. The width of the mashups in the Collection appears as expected after the page is reloaded.

 

My question is: How can I use Auto Refresh to update the mashup width in the Collection without having to refresh the entire page?

ACCEPTED SOLUTION

Accepted Solutions

I found a solution!
I created an expression that triggers the command TW.location.reload() after the auto-reload. This forces a full mashup reload, which causes the collection component to reinitialize properly.

View solution in original post

11 REPLIES 11

I don't have an answer to your question, but I wonder why you don't use a bar chart or stacked bar chart widget instead of a collection of mashups?

GABRYEL25770
12-Amethyst
(To:Rocko)

Because I need to complete this task with those specifications, this specific font for the number, and a minimalist visualization. I tried using the standard widgets available in this version, but I couldn't achieve the desired result.

9.3 is out of support for half a year now. Have you tried with a newer version that is in support? Not only the widgets have made progress, so you may be able to do it with the chart widget intended for this visualisation, you might also find this issue not persisting in a newer version.

Hello @GABRYEL25770,


I wanted to follow up with you on your post to see if your question has been answered.
If so, please mark the appropriate reply as the Accepted Solution for the benefit of other members who may have the same question.
Of course, if you have more to share on your issue, please let the Community know so that we can continue to support.


Thanks,
Abhi

Hi, I haven't found a solution yet. I'm currently working on other projects to optimize my time and just waiting for someone who has faced the same problem as me to reply.

I tried on TWX 9.6.1 and it did refresh cell width and height for me on auto refresh.

I was using View "Flow". When using "Table" it always uses the full available width, not considering my cellWidth. But I think this is wanted in this view - not sure.

 

I am not sure of your exact setup. Maybe you can provide a sample which has the issue. So I could retry in my version? If this is of any help.

Yes, I'm using the Flow visualization. I'll share some pictures of the collection settings and how the data flows into the widget.

GABRYEL25770_0-1751973586765.png

GABRYEL25770_1-1751973626493.png

GABRYEL25770_2-1751973661037.png

 

GABRYEL25770_3-1751973758997.png

GABRYEL25770_4-1751973891172.pngGABRYEL25770_5-1751973922785.png

 

 

Hi @GABRYEL25770,

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant.

configuration seems similar to mine in my test.

I cannot further test than I did already. Would be best if you can provide a sample mashup which has the issue. So I (/the community) could validate it in my TWX and maybe spot an issue.

As it might be the case that there was an issue in your version of TWX with the widget - but to verify the mentioned approach would be good: I try your mashup in my twx to validate if it works there.

Hello @GABRYEL25770,

 

There's a standard Shape widget, which can be used for displaying progress bars. Configure it like this:

 

1. Width / height -- to fill your collection cell

2. EnableDynamicFill: YES

3. DynamicFillOrientation: Horizontal

4. Style: Something with a background

 

Bind your percentage number to its Data property.

 

/ Constantine

I found a solution!
I created an expression that triggers the command TW.location.reload() after the auto-reload. This forces a full mashup reload, which causes the collection component to reinitialize properly.

Announcements


Top Tags