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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Dynamically deleting Infotable rows displayed in a Collection Widget

jorgeporras
10-Marble

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
PaiChung
22-Sapphire I
(To:jorgeporras)

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


@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.

PaiChung
22-Sapphire I
(To:jorgeporras)

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.

 

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

Announcements


Top Tags