Skip to main content
Participating Frequently
Jul 24, 2021 4:09 PM UTC
Question

How to write to the database from an interface....

Hi, Im new to Appian. Id like to add to my cloud database from an interface! However, I have a primary key thats auto incremented in the table and cant be null. So how do I add from my interface? Should I use an expression rule? query it? I dont know how to make sure the IDs arent the same each time the user adds something.

Thanks 

    3 replies

    Participating Frequently
    Jul 24, 2021 4:25 PM UTC

    Configure a!writetodatastoreentity(). You can save the response using fv!storedValues it will have the id populated (generated) by DB auto increment. 

    From documentation 

    "You must also designate a field in the CDT as your record ID (primary key) and specify an existing value, or the data written is always inserted as a new record."

    Participating Frequently
    Jul 24, 2021 4:27 PM UTC

    Im writing this in the Query....

    stefanhelzle0001
    Brainy
    Jul 24, 2021 5:08 PM UTC

    I suggest to start with going through the Appian tutorials. This will teach you the basics.

    docs.appian.com/.../Tutorials.html