if widget

  
LS,

As I can see it In the if widget you can display two different texts based on a condition). How do I display several different texts? I want to display texts based on the value of an attribute (data); the value of the attribute comes in approx 12 different  'flavours'.


Regards, Harry 
Hi,

You have the SWITCH widget just below the IF widget, that I think is what you're looking for.
Hi Harry,

You will have to chain several If widgets inside their respective Else areas, e.g.

if A
  text1
else
  if B
    text2
  else
     text3
   endif
endif

but if all you are displaying within the if is a text (rather than widget content) you may want to make that text an Expression widget and use the inline if() build-in function instead.

Regards,


Miguel
Hi Miguel,

Thanks for pointing to the expression widget, that'll do the trick.
If(Session.varRB=1,"Text for value 1",
    If(Session.varRB=2,"Text for value 2",
        If(Session.varRB=3,"Text for value 3","")))


Do you have any idea if this is possible for formatted html text too?
Say I want to show the text for value 1 in red, for value 2 bold in anther font, etc.
 
Regards, Harry
Harry, 

in that scenario you should combine with css rules according to the needs. 

Check out the Sales app example available @ http://www.outsystems.com/apps. In the Pending Opportunities webscreen you'll find an example of what you lookng for.

Cheers, 
RNA
Ricardo, Thank you for pointing me to the example. Regards, Harry