Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

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

  Discussion posts and replies are publicly visible

Parents Reply
    1. you can only delete from the database table using the identifiers (primary keys) of the rows you want to delete when using deleteFromDataStoreEntities 
    2. you therefore first need to fetch those primary keys. To fetch them you need to, as Stefan described, run a query using a!queryEntity() and use the values you have described above as filters for the rows you want returned from the database

Children