Skip to main content
1-Visitor
December 14, 2020
Solved

value display widget

  • December 14, 2020
  • 2 replies
  • 3228 views

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.

Best answer by Ashritha

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 

 

 

 

 

2 replies

22-Sapphire I
December 14, 2020

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_011-VisitorAuthor
1-Visitor
December 14, 2020

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!

22-Sapphire I
December 14, 2020

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.

Ashritha15-MoonstoneAnswer
15-Moonstone
December 17, 2020

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_011-VisitorAuthor
1-Visitor
December 17, 2020

Thanks issue is resolved