as title, how can i add data to multiple table at same time by using a!writeToDataStoreEntity, give me a example code, thank you
Discussion posts and replies are publicly visible
HI
You can write to one Data base table using a!writeToDataStoreEntity() , where as you can use a!writeToMultipleDataStoreEntities() to write data to multiple data base tables
below is an example for the a!writeToMultipleDataStoreEntities()
a!writeToMultipleDataStoreEntities( valuesToStore:{ a!entityData( entity:/* DATA STORE ENTITY*/, data:/* DATA THAT NEED TO BE STORED*/ ), a!entityData( entity:/* DATA STORE ENTITY*/, data:/* DATA THAT NEED TO BE STORED*/ ) })
Else if you are using process model then you can go with the Write to Data Store Entity Smart Service .
docs.appian.com/.../Write_to_Multiple_Data_Store_Entities_Smart_Service.html
This way only store into the entity of first one, the second one didn't make any changes why?