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
You will need to first fetch the primary key values from that table using queryEntity, and then delete the rows based on that key.
could u pls elaborate ?
you can use the Query database to delete the data from DB based on some condition.
use ac! to provide the value into filter and provide the value into Data tab on the smart service.
can we do it in expression ?
No. This is process only.
Its giving me a "Reaction Tree" as output. Also data is not getting deleted. What's the issue ?
deleteFromDatastoreEntities will work under save into configuration only.
I think we need a short intermission here. How much experience do you have with Appian, and what is your goal?
I am new to Appian Stefan.
Hi Deepak, I am trying it with save into but still the same issue,
a!cardLayout( contents: a!gridField( label: "Suites", labelPosition: "ABOVE", data: 'recordType!{0ab1955b-75e1-4395-87a8-d16e55c29b74}BTUA_AllSuites_RecordType', columns: { a!gridColumn( label: "Suite Name", sortField: 'recordType!{0ab1955b-75e1-4395-87a8-d16e55c29b74}BTUA_AllSuites_RecordType.fields.{7b3f7cbc-6a7e-4604-9b65-b1073301ce9e}suitename', value: a!linkField( links: { a!dynamicLink( label: fv!row['recordType!{0ab1955b-75e1-4395-87a8-d16e55c29b74}BTUA_AllSuites_RecordType.fields.{7b3f7cbc-6a7e-4604-9b65-b1073301ce9e}suitename'], saveInto: { a!deleteFromDataStoreEntities( dataToDelete: { a!entityDataIdentifiers( entity: cons!BTUA_v2_Script_tbl_constant, identifiers: {"6722c859-76b4-4aa8-ac82-3b3f93f903ba"} ) } ), a!save(ri!isSuiteSelected,true()), a!save(ri!isScriptSelected, false()) } ) } ) ) }, validations: {}, refreshAfter: "RECORD_ACTION", showSearchBox: true, showRefreshButton: false, recordActions: { a!recordActionItem( action: 'recordType!{0ab1955b-75e1-4395-87a8-d16e55c29b74}BTUA_AllSuites_RecordType.actions.{a25985f0-edf5-48c3-9a5c-af500c96668e}newBTUA_AllSuites_RecordType' ) }, actionsDisplay: "LABEL_AND_ICON" ) )
Image View:
Could you pls tell me what's the exact issue ?
Hi, could you please show me the record image?
I have used the data store entity instead of record
6722c859-76b4-4aa8-ac82-3b3f93f903ba is this the primary key value?
yes,
6722c859-76b4-4aa8-ac82-3b3f93f903ba is the primary key Deepak gupta
Is the entity which you are taking is correct?