# Hide/Show a Button in Table Blockview

**URL:** <https://forum.inductiveautomation.com/t/hide-show-a-button-in-table-blockview/67270>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [December 6, 2022, 11:06am UTC](https://forum.inductiveautomation.com/t/hide-show-a-button-in-table-blockview/67270 "2022-12-06T11:06:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Hrdlica](https://avatars.discourse-cdn.com/v4/letter/p/7ea924/32.png) [@Peter\_Hrdlica](https://forum.inductiveautomation.com/u/Peter_Hrdlica)\
**Post date:** [December 6, 2022, 11:06am UTC](https://forum.inductiveautomation.com/t/hide-show-a-button-in-table-blockview/67270/1 "2022-12-06T11:06:23Z")

</div>

Hello,

I have one column in my Embedded View Table which has a button for Date selection for each record . My question is, how can I hide (make invisible) the button when the value equals to selected date? And how can I keep the button visible if the value is null?

---

<div class="post-metadata">

**Author:** ![ShaneH](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ShaneH](https://forum.inductiveautomation.com/u/ShaneH)\
**Post date:** [December 6, 2022, 3:00pm UTC](https://forum.inductiveautomation.com/t/hide-show-a-button-in-table-blockview/67270/2 "2022-12-06T15:00:26Z")

</div>

Hi-

Can you provide a little more detail? Is this a Perspective or Vision table?

If Perspective, I'm assuming you are using an embedded view on the table column to display the button. If so, then you can tie the button visibility property to an expression binding which checks the date property.

HTH.  
-Shane

---

<div class="post-metadata">

**Author:** ![Peter\_Hrdlica](https://avatars.discourse-cdn.com/v4/letter/p/7ea924/32.png) [@Peter\_Hrdlica](https://forum.inductiveautomation.com/u/Peter_Hrdlica)\
**Post date:** [December 6, 2022, 7:43pm UTC](https://forum.inductiveautomation.com/t/hide-show-a-button-in-table-blockview/67270/3 "2022-12-06T19:43:48Z")

</div>

Hi,

It is a Perspective.

Instead od blank value i would like to show the blue button with Date Picker (this is already prepared in another view).

Sample scratch:

 ![example](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/4/4455d23ba699d9c73e0be1fb47d5d4c0eb0fe6d0.png)

How should the expression binding look like?

---

<div class="post-metadata">

**Author:** ![ShaneH](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ShaneH](https://forum.inductiveautomation.com/u/ShaneH)\
**Post date:** [December 6, 2022, 9:15pm UTC](https://forum.inductiveautomation.com/t/hide-show-a-button-in-table-blockview/67270/4 "2022-12-06T21:15:06Z")

</div>

Lots of details here:  
[https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table)

But the basics are (I have not tested any of this!):

Create an embedded view. Call it 'evTableDateInput'.

The embedded view should have one input param: rowData  
The table component will pass an object containing the data for the table row in this, including your 'SelectedDate' field.

The embedded view should have two components:

- a label to display your date
- and a datetime input component

Tie the label text property to your passed date with an expression binding:

- toStr({view.params.rowData.value.SelectedDate})

Tie the visibility property of both components to the view param:

- toDate({view.params.rowData.value.SelectedDate},0)!=0 (for the label so it shows if date is set)
- toDate({view.params.rowData.value.SelectedDate},0)=0 (for the datetime so it only shows if no date is set)

In your table columns:

- Change the render of your date column from 'date' to 'view'.
- Set the viewPath on your date column to point to the your embedded view 'evTableDateInput'.

Note: Given the way the datetime input component works, you could probably get by with just using it in your embedded view since it will display a date.

Note 2: Getting the selected date out of the table, using it and/or saving it to a DB is a completely different task.

Note 3: I made a lot of assumptions about how your table data is organized. Whether you're using JSON data, dataset, arrays of objects, etc. will affect how you reference the passed row data in your embedded view.

HTH.  
-Shane

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 6, 2022, 9:37pm UTC](https://forum.inductiveautomation.com/t/hide-show-a-button-in-table-blockview/67270/5 "2022-12-06T21:37:52Z")

</div>

> [@Peter\_Hrdlica](#):
>
> Blockview Table

What is a "blockview" or "Blockview" table? It's not mentioned in the user manual.

I suspect that a table is not the way to achieve what you are trying to achieve but your goal is not clear.
