Skip to main content
Inspiring
Sep 5, 2022 2:41 PM UTC
Solved

Delete data from data store having some conditions to column similar to where clause in RDBMS

Hi team,

I am looking for a way by which I can delete a data from a data store entity having some conditions.

For example, I am having a cdt having the following structure and values,

ID - Name - email

1 - Jai - jai@vijay.com

2 - vishwaas - vishwaas@nahihai.com

3 - jignesh - jai@vijay.com

Now above, id is a primary key but I want to delete the data having email as jai@vijay.com

I am not able to achieve the same using a!deleteFromDataStoreEntities smart service. Can you pls help me in writing an expression rule which can delete the two rows (1 and 3 having email as jai@vijay.com)?

Consider name of the constant for data store entity as : myDataStoreEntity

Inspiring
Sep 8, 2022 4:31 AM UTC

I am doing a POC for an application with Appian Stefan. 

I found that I was missing onSuccess and onFailure attribute. It was so simple. 

By the way thanks guyz for your precious time and efforts.

28 replies

stefanhelzle0001
Brainy
Sep 5, 2022 2:44 PM UTC

You will need to first fetch the primary key values from that table using queryEntity, and then delete the rows based on that key.

Inspiring
Sep 5, 2022 2:44 PM UTC

could u pls elaborate ?

stefanhelzle0001
Brainy
Sep 5, 2022 2:46 PM UTC

What is your question? What did you try? What was the outcome? Any code snippets?