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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

value display widget

p3
9-Granite
9-Granite

value display widget

Greetings!!!

can anyone please explain me how to use ValueDisplay Widget?

I've a requirement like, There are few values available lets assume R1-R4(service result).  so how can I use valueDisplay widget to show R3 in RED color.

ACCEPTED SOLUTION

Accepted Solutions
Ashritha
14-Alexandrite
(To:p3)

Example: If the service output is R3 - text color red ; else text color black

Steps:

  1. Create 2 style definition - one with black as text color and another with red as text color
  2. Create a State definition 
    1. Click on State Information 
    2. Apply the state type: as a String/Value
    3. Click on +Add
    4. String/value : R3
    5. Style : Attach the style definition with red text color and save using ✓
    6. Click on default and attach the style definition with black text color and save using ✓
    7. Save the State definition
  3. Attaching state definition to value display
    1. After binding data to value display - click on Renderer on state in the widget properties tab
    2. Select State-based Formatting radio button
    3. Dependent Field : Select the data column that holds R1 or R3 .. data
    4. State Definition : Assign state definition created earlier
    5. Click on done
    6. Save the mashup

For More Information : StateDefinition 

 

 

 

 

View solution in original post

7 REPLIES 7
PaiChung
22-Sapphire I
(To:p3)

Are you looking to display each value in a separate display or you want to pick between R1-R4 and that shows up in the display?

If you want just one display, then you probably can do it with a mashup parameter or session parameter or service and write your selection to that and then from that populate the value display.

Apply state based definitions to the value display to show the proper color states.

If you need different limits, those have to be provided as values as well.

p3
9-Granite
9-Granite
(To:PaiChung)

Hi,

I want R3 in red where R1,R2 and R4 are in green if service gives me output as R3.

please provide me detailed steps or any article that can fulfill my requirement.

 

Thanks!

PaiChung
22-Sapphire I
(To:p3)

You can use a service to determine the states of R1-R4 and what is selected and create an output from that to display the values necessary but also add a specific 'state' column that can drive the state based definition.

p3
9-Granite
9-Granite
(To:PaiChung)

Thanks for your response

as I'm new for this, can you please elaborate in detail?

I've collection mashup to show R1-R4 value display widget, need to understand details of service and how to access state based. Thanks.

zyuan1
18-Opal
(To:p3)

Is your service returning 1 in 4 answers everytime, and you need to mark the output in the 4 row of data?

 

And why don't you use the Grid widget to present the 4 rows of data?

 

If the data is not in 4 rows but just 4 strings, have you tried Radio button?

Ashritha
14-Alexandrite
(To:p3)

Example: If the service output is R3 - text color red ; else text color black

Steps:

  1. Create 2 style definition - one with black as text color and another with red as text color
  2. Create a State definition 
    1. Click on State Information 
    2. Apply the state type: as a String/Value
    3. Click on +Add
    4. String/value : R3
    5. Style : Attach the style definition with red text color and save using ✓
    6. Click on default and attach the style definition with black text color and save using ✓
    7. Save the State definition
  3. Attaching state definition to value display
    1. After binding data to value display - click on Renderer on state in the widget properties tab
    2. Select State-based Formatting radio button
    3. Dependent Field : Select the data column that holds R1 or R3 .. data
    4. State Definition : Assign state definition created earlier
    5. Click on done
    6. Save the mashup

For More Information : StateDefinition 

 

 

 

 
p3
9-Granite
9-Granite
(To:Ashritha)

Thanks issue is resolved

Announcements


Top Tags