Skip to main content
April 12, 2021
Question

delete data store entity

  • April 12, 2021
  • 5 replies
  • 0 views

I need to delete a specific record in data store entity. i am getting the primary key id value in a text field named ID from an Interface how to map the value received from an interface to the data to delete field in Delete data store entity node in process model.

I configured the node as below:

Data to delete---={entity: cons!CONSTANT_POINTER_TO_DATA_STORE_ENTITY, identifiers: pv!primarykey_field}

5 replies

April 12, 2021

hi swathi,

1) please create rule input in the interface and map the user entered value to the same(ri!employeeid)(plsmake sure you have submit button).

3)in the process model -startform -add the interface and map the rule input to the corresponding process variable(pv!employee.empidpkto ri!employeeid

3)in the delete to datastore entity , configure the below 

{  entity: cons!EMPLOYEEDETAILS,  identifiers: { pv!employee.empidpk }}

please try the above logic and let me know if this works for you. Thanks

April 14, 2021

I have doubt in step2!

how should i configure the rule input with the pv

pv!employee.empidpkto ri!employeeid- i couldnt give like this it throws error.

April 14, 2021

hi swati,

pls try the below code 

a!localVariables(
local!empid:0,
a!formLayout(
label: "Form",
contents: {
a!integerField(
label: "Enter the employeeid",
labelPosition: "ABOVE",
value:local!empid,
saveInto: local!empid,
refreshAfter: "UNFOCUS",
validations: {}
)
},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "Submit",
submit: true,
saveInto: {
a!save(
ri!employeeid,
tointeger(local!empid)
)
},
style: "PRIMARY"
)
},
secondaryButtons: {
a!buttonWidget(
label: "Cancel",
value: true,

submit: true,
style: "NORMAL",
validate: false
)
}
)
)
)

in the process model 

Please declare the pv! and then select data type is corresponding CDT

in the start form pls map the  pv!employee.empidpkto ri!employeeid

please let me know if this works for you

pratiks0003
April 13, 2021

hi swathi,

to delete data store entity you should use delete data store entity and  call a!entitydataidentifire function in data to delete section and pass entity and identifire paramenter same as above you passed.

April 14, 2021

hi swathi

To delete a specific record we use a!entitydataidentifire .

 In the delete to delete node  , configure as:

=a!entityDataIdentifiers(  entity:cons!POINTER_TO_DATA_STORE_ENTITY,  identifiers:POINTER_TO_DATA_STORE_ENTITY).

thanks