I'm new to Appian, i want to insert data to my table.
1. Created a CDT with elements for Leave Request(Employee Name, Email, LStartDate, LEndDate)2. Created datasource and assigned CDT to it.3. Created Form from scrach and added fields with rule input on it.
now i want to create data store entity smart service to insert my data from Form to table Leave Request.
how to create data store entity smart service and call on submit button clicked.
Discussion posts and replies are publicly visible
Hi,
Please call the following smart service rule in the saveInto list i.e. { }
a!writeToDataStoreEntity( dataStoreEntity: cons!DATA_STORE_ENTITY, valueToStore: ri!rule_input )
Thanks
Thanks for Quick reply.
But, I want to pass below rule inputs to table:-
1. LeaveRequest (Text)
2.EmployeName(Text)
3. EmployeeEmail(Text)
4.StartDate(Date)
and table is having ID column which is auto generate. In this case how i can pass in to ValueToStore?
I'm not exactly sure what you're still missing, but if this is any help, for an auto generated field (i.e. primary key id), you simply leave that field blank in your CDT when writing to data store, and the value is assigned properly during database write.
How to pass multiple filed values to table?
a!writeToDataStoreEntity(dataStoreEntity: cons!DATA_STORE_ENTITY,valueToStore: ri!LeaveRequest, ri!EmployeName, ri!EmployeeEmail, ri!StartDate) ?
You have to create a separate rule input for a cdt which typed of the CDT, you have created. Then save all the fileds in this single CDT typed rule input and pass this rule input to valueToStore.