cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically deleting Infotable rows displayed in a Collection Widget

Highlighted
Participant

Dynamically deleting Infotable rows displayed in a Collection Widget

What would be the best practice to follow if I wanted to let a user delete a row of an Infotable displayed through a Collection Widget by placing a button in every cell of said widget?

 

Screen Shot 2019-06-04 at 17.29.16.png

4 REPLIES 4

Re: Dynamically deleting Infotable rows displayed in a Collection Widget

As you realize probably, info tables do not have a Primary Key, so you will need to 'contrive' something that makes it unique either by combination of fields, or inserting something unique like a guid

then you can use 'Delete' 

 

Example: 

var newInv = me.CurrentInventory;

newInv.Delete({ productID: ProductID });

me.CurrentInventory = newInv;

 

Note: This example shows how to do it persistently to an infotable property value

Re: Dynamically deleting Infotable rows displayed in a Collection Widget


@PaiChung wrote:

As you realize probably, info tables do not have a Primary Key, so you will need to 'contrive' something that makes it unique either by combination of fields, or inserting something unique like a guid

then you can use 'Delete'


I already have a service to delete rows based on an identifier. What I'm looking for is a way to update the Infotable that populates a Collection Widget through clicks on buttons located in every cell of said Collection Widget.

Re: Dynamically deleting Infotable rows displayed in a Collection Widget

When you click in a cell of the collection widget, you will have a Selected Row.

You can place that in a Session Parameter and then the service that the click runs can retrieve the information from the session.

You can also just use the information that is within the cell and pass those as parameters into the service you trigger with the click.

I hope I understood your question correctly.

 

Re: Dynamically deleting Infotable rows displayed in a Collection Widget

Thank you, I'll try something with the session data.