Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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?
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.
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.