# How do add a CheckBox to a Record view?

**URL:** <https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475>\
**Category:** Classic Servoy\
**Created:** [January 20, 2011, 9:51am UTC](https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475 "2011-01-20T09:51:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttmgybta](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@ttmgybta](https://forum.servoy.com/u/ttmgybta)\
**Post date:** [January 20, 2011, 9:51am UTC](https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475/1 "2011-01-20T09:51:22Z")

</div>

How I’m able to add a CheckBox to a Record view for each row whit a dataprovider that could change on each row and the dataprovider for the CheckBox is not in the table?

I created a variable and set it as the dataprovider for the CheckBox, this works as long I have one Row. Bud if I have more the one ore I don’t know yet how many, how do I set a different value to the next Checkbox in my List?

Thanks in advance  
Regards  
ttmgybta

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [January 20, 2011, 11:09am UTC](https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475/2 "2011-01-20T11:09:46Z")

</div>

Hi ttmgybta (nice name ![;)]( "Wink") ),

You can’t create form objects _per row_ in a listview/tableview. Neither can you add a different dataprovider (in your case a variable) per row to a column.

I understand you want to have a checkbox in the list that is not really connected to a table but is all in memory, correct?  
In that case you can use the following trick. Create an unstored calculation on this table you have this form based on with the following code:

```auto
return;

```

That’s it.  
This calculation is now an in-memory column and you can write and read data from/to this column so you can use this as your checkbox column in your list.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![ttmgybta](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@ttmgybta](https://forum.servoy.com/u/ttmgybta)\
**Post date:** [January 20, 2011, 1:38pm UTC](https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475/3 "2011-01-20T13:38:14Z")

</div>

Hi Robert

Yes it helped!!  
Thank you, it works!!

Regards  
ttmgybta

---

<div class="post-metadata">

**Author:** ![ttmgybta](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@ttmgybta](https://forum.servoy.com/u/ttmgybta)\
**Post date:** [January 20, 2011, 1:54pm UTC](https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475/4 "2011-01-20T13:54:18Z")

</div>

It worked so far…  
Now my problem is that I want to add an onDataChange event, but the event never gets fired.  
Any idea?

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [January 20, 2011, 2:22pm UTC](https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475/5 "2011-01-20T14:22:58Z")

</div>

What are you trying to do ?

---

<div class="post-metadata">

**Author:** ![ttmgybta](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@ttmgybta](https://forum.servoy.com/u/ttmgybta)\
**Post date:** [January 20, 2011, 2:36pm UTC](https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475/6 "2011-01-20T14:36:12Z")

</div>

I created a CheckBox as you recommended whit the unsorted calculation on the table.  
On Load I set the calculation Field for each row, this works fine and it shows me everything as I wished.  
But if I want to change the value of one CheckBox in the list with the onDataChange event, the event is not fired.  
Be aware I’m Working with the framework and I open the list in a application.showFormInDialog window.

---

<div class="post-metadata">

**Author:** ![ttmgybta](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@ttmgybta](https://forum.servoy.com/u/ttmgybta)\
**Post date:** [January 20, 2011, 4:14pm UTC](https://forum.servoy.com/t/how-do-add-a-checkbox-to-a-record-view/13475/7 "2011-01-20T16:14:02Z")

</div>

It’s OK I figured it out in the mean time!  
I have to set the status of the Window to edit, whit the

```auto
globals.svy_nav_dc_setStatus('edit', 'my_Form')

```

and after when I close the Window back to

```auto
globals.svy_nav_dc_setStatus('browse', 'my_Form')

```

Then it works also withthe onDataChange event.  
This is all because of the framework.

Thanks for your help  
ttmgybta
