readonly disabled checkbox and showing values

Dear all,
I'd like the checkbox to become unclickable (readonly) and remain showing their computed values per line as illustrated below.

I followed the approach here which is explained to disable the checkbox after button clicked:

https://www.outsystems.com/forums/discussion/47515/disable-a-ckeckbox-when-press-a-button/

It tells to:


  1. create a Boolean variable IsCheckBoxEnabled, 
  2. set default value to be true,
  3. set it to the enable property of the check box
  4. then assign a value for IsCheckBoxEnable variable to be false in onclick action. 

In my scenario however there is no button. I fetch data and should display in checkbox and the way how it works in my case is that first it shows the values which immediately replaced by disabled gray checkbox and lost values.

Could you help me with the issue please?
Thank you so much

Hi Gulbala, if I'm understanding the intent correctly, you'd like to display a checkbox that only displays the value of the attribute, either checked or unchecked - and for it not to be an element that can be interacted with in any way?

One solution would be to replace the checkbox element with an If widget - presuming the attribute "At Desk" is a Boolean value, set it to the condition of the If statement. In the True branch, place an icon and select the check_square_o (or similar). In the false branch, place an icon and select square_o.


Hi Gulbala,

You can follow the approach that Michael has shared.

In additional, in case you don't want to use icon with IF widget, you can use the checkbox widget and set Enabled property to FALSE (no need to use other variable because you just want to show it, no behaviour to enable or disable).

Cheers,

Khuong 

Hi Gulbala, if I'm understanding the intent correctly, you'd like to display a checkbox that only displays the value of the attribute, either checked or unchecked - and for it not to be an element that can be interacted with in any way?

One solution would be to replace the checkbox element with an If widget - presuming the attribute "At Desk" is a Boolean value, set it to the condition of the If statement. In the True branch, place an icon and select the check_square_o (or similar). In the false branch, place an icon and select square_o.


Hi Gulbala,

You can follow the approach that Michael has shared.

In additional, in case you don't want to use icon with IF widget, you can use the checkbox widget and set Enabled property to FALSE (no need to use other variable because you just want to show it, no behaviour to enable or disable).

Cheers,

Khuong 

Dear @Khuong Truong and @Michael Samuel many thanks both of you .
I did follow both ways and both work. I ended up something like this:


The if and icon approach seems to be all right but regarding disabled checkbox, it become difficult to notice the tick marks inside. It looks like it needs some further css style modification :)

 




Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.