Skip to main content
September 5, 2022
Solved

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

  • September 5, 2022
  • 28 replies
  • 0 views

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

Best answer by mohdjaveda0001

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
September 5, 2022

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

September 5, 2022

could u pls elaborate ?

stefanhelzle0001
Brainy
September 5, 2022

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