cancel
Showing results for 
Search instead for 
Did you mean: 

Delete multiple records from On-Device data source in SAP Build Apps

sudarshan005
Explorer
530

Hello All,

I want to delete multiple records from my on-device data source by a button click but I'm unable to achieve it. I've tired the looping logic as well as the creating a trigger event in Global canvas and using it in component tap. But nothing is working as it should be.

Is there any way to acheive this.

Best Regards,

Sudarshan Pattanayak

Accepted Solutions (1)

Accepted Solutions (1)

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

I would delete them without having to retrieve them each time. Basically the same way but using the data variable to manage the loop.

The if condition is (or you can reverse things and remove the NOT):

NOT(IS_EMPTY(data.Test1))

The delete record selects the record with a formula:

data.Test1[0].id

And the set variable record collection is:

REMOVE_ITEMS_AT(data.Test1, 0)

I can't really debug what you have without seeing the configuration.

sudarshan005
Explorer
0 Kudos

Thank you daniel.wroblewski,

The looping logic was accurate and helped me a lot.

Answers (0)