Skip to main content
October 26, 2022
Question

write to database using recordtype in a expression rule

  • October 26, 2022
  • 3 replies
  • 0 views

Hey Guys,

i just want to write a rule expression. wrting(create) data to the database using record type. the record type is already synced with the database.

I can not figure it out. i also tried using Write to record smart serice but  i keep getiing error that i can not use record type. 

how is something so easy so difficult to find solution.

please help. i just need a a expression structure for writing data to the database using record type

3 replies

stefanhelzle0001
Brainy
October 26, 2022

You cannot modify data in an expression. That includes writing to the database or records.

Do this in a process model or in a saveInto of a UI component.

To write a record, use a!writeRecords()

October 26, 2022

can i use a!writeRecords() in a script task? i already tried i keep getting error.  or do i need to do it in a write to record smart service?

stefanhelzle0001
Brainy
October 26, 2022

As I already tried to explain. You can modify data only in a process or in a direct user interaction.

"The Write Records smart service is available as an expression function that can be executed inside a saveInto on a Interface Component or as part of a Web API."

docs.appian.com/.../Write_Records_Smart_Service.html

You can try to describe your use case and we can help you to achieve this.