Interface Definition: Expression evaluation error [evaluation ID = XVWQ7PGA] : An error occurred while executing a save: Expression evaluation error : Attempted to run a second smart service, but only one smart service can be run per expression evaluation.
Discussion posts and replies are publicly visible
The documentation says:
"NOTE: While you can use any number of saves, only one smart service can be executed in an interface saveInto parameter"
saveInto
(see: https://docs.appian.com/suite/help/19.3/executing_smart_services.html)
We can execute only one smart service in saveInto parameter.
you can try like this , for suppose if you have two process model process model 1 and process model 2 you need to start this process models at same time when you clicks on button or link ,then create a parent process model in that parent process model you can start process model 1 and process model 2.
so in saveInto parameter execute smart service to start parent process model.
Can you explain your use case for executing 2 smart services at the same time? There may be other work-arounds depending on what you are trying to accomplish. For example, if you are trying to write to two different database tables, you can use the a!writeToMultipleDataStoreEntities() instead of a!writeToDataStoreEntity().
You could just start a process in your saveInto() within which you can execute > 1 Smart Service...but it does depend entirely on exactly what you're trying to achieve, as Peter Lewis is asking...
I try to add and remove , so i write new selection data in database and need to remove the previews selection from database ,
each selection is reservation in business
Peter Lewis if i need to use a!a!writeToDataStoreEntity() and a!deleteFromDataStoreEntities()
...then your best bet is to start a process to achieve this as you can run both of these in sequence or in parallel as requirements dictate.
Agreed with Stewart - a process is probably your best bet.
The one other way I've done this is to do a different kind of delete. Often, when I "delete" data I want to hide it from users but not delete from the database because that will permanently remove the data. So, I create an extra boolean column in my CDT called "isDeleted" or something like that. Now, whenever I want to delete a row, I actually just change the value of the isDeleted field to true. Since this no longer requires a delete (only writeToDataStoreEntity()), you can now do this all in the same transaction.
All that being said - if you already have it set up to delete from the DB, you probably don't need to change it. This is just food for thought in the future