Expand my Community achievements bar.

Variable image

Avatar

Former Community Member

Hi,

I have a requirement, where I have to display a green signal (round green icon or a green tick icon) if a variable has some value. If the value is initial it should display a red signal (round red icon or a red cross icon). Is this possible? How can I set the image URL property dynamically?

Thanks

Charli

2 Replies

Avatar

Level 10

Therefor you don't need to insert different images.

It also can be done with a dingbat like the font "Windings".

Here an example:

https://acrobat.com/#d=ggwYgD9o-*JsWHfxtNCELA

It has a textfield and a Text with a simple circle as symbol.

A script in the layoutReady:event of the textfields checks if the textfield is eiter empty or filled and changes the font color of the symbol.

if ($ eq null) then

     Signal.font.fill.color.value = "255,0,0"

else

     Signal.font.fill.color.value = "153,204,0"

endif

Signal_Icon.jpg

radzmar

http://thelivecycle.blogspot.com/

Avatar

Former Community Member

Thanks radzmar. I did create two cirlces, one with red and another with green color. Using script I hide one circle.

Charli