Remove rows clicking in the button eliminate

Hello guys, i have this datatable and i want when the user select one of them line and click in button eliminate, it eliminate the selected row.


It´s possible?

Hello Francisco,

You need to add a button to the table (for example, another column for the button). It will appear for every single line of the table.

After this, you just need to create a new Screen Action and bind it to the On Click Event of the button. You should pass an input variable for this action with the selected Id.

In this Screen Action, you should call a Server Action where you execute the Delete in the database.

Let us know if you managed to do it.


Kind regards,

Rui Barradas

Solution

Hi Francisco,


Yes it is possible.

What you can do, you add a column to the right:

You drag a button or an icon from the side bar:

You link it to an action:

You add an id input that you want to remove (in my example ExampleId), remove it calling the DeleteExampleById (you can find it under the entity) and refresh the query:



Hope it helps.


Cheers,

João

Solution

Hi Francisco,

It is possible to achieve.

few doubts,

1.You are implementing it in reactive or traditional.

2. by stating "Eliminate", you want to remove it from the screen or from the database as well.


Regards,

LK

Hello Francisco.


It is.


You mean delete from the table or from the database?

In database: You just need to configure the Delete button to receive the id represented on that line and call a delete passing the id. I'd advise you to use the confirmation message also!

In table: same logic, but you simply delete the line from the list that feeds the table. The data will still be available after a refresh because the database was untouched.

João Marques wrote:

Hi Francisco,


Yes it is possible.

What you can do, you add a column to the right:

You drag a button or an icon from the side bar:

You link it to an action:

You add an id input that you want to remove (in my example ExampleId), remove it calling the DeleteExampleById (you can find it under the entity) and refresh the query:



Hope it helps.


Cheers,

João

 

 Like this?


Francisco Brito wrote:

João Marques wrote:

Hi Francisco,


Yes it is possible.

What you can do, you add a column to the right:

You drag a button or an icon from the side bar:

You link it to an action:

You add an id input that you want to remove (in my example ExampleId), remove it calling the DeleteExampleById (you can find it under the entity) and refresh the query:



Hope it helps.


Cheers,

João

 

 Like this?


 

 Yes, that should work.


Cheers,

João

João Marques wrote:

Francisco Brito wrote:

João Marques wrote:

Hi Francisco,


Yes it is possible.

What you can do, you add a column to the right:

You drag a button or an icon from the side bar:

You link it to an action:

You add an id input that you want to remove (in my example ExampleId), remove it calling the DeleteExampleById (you can find it under the entity) and refresh the query:



Hope it helps.


Cheers,

João

 

 Like this?


 

 Yes, that should work.


Cheers,

João

 Thanks it´s working prefetcly, very very thanks :D

 

You're welcome, I am glad I could help!


Cheers,

João