Process model error

Hi Guys,

I created a process model which let the user inserts his information then save them to the database, it worked fine, but doesn't save the data to the database. When I did refresh I got this.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    Hi Mike,

    I was mostly suspicious of the houseBid being a double after reading the error a couple of times. In my CDT it is referred to integer and when looking at the cloud database its double. I believe it takes houseBid as an amount that is being bid on and therefore doesn't default it to an integer. My overall problems seem to have been solved by recreating the CDT and using bidId as the primary key, and bidAmount as integers and other fields. Can't personally understand why it defaulted to Double in the cloud database outside of it being an auto language detection thing. 

Children
  • 0
    Certified Lead Developer
    in reply to aaron.li
    I believe it takes houseBid as an amount that is being bid on and therefore doesn't default it to an integer.

    that would be a strange thing to set as a primary key id field, then.

    i'm a little unclear here whether you created the DB table then the CDT based on it, or the other way around - but if you create the CDT first, you'd need to make the PKID field Integer type.  If you create the DB table first, you'd need to use int(11) type.  "Double" is merely the DB-side type for the Appian data type of "decimal" as seen in your screenshot.  (I know you might know these things already, but adding just in case clarificaiton is needed.)

    Either way, at the end of the day, it seems as if something was not set correctly at creation time.  I hope you have it working now as hinted by your reply.

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    Thank you for the clarification, its very much appreciated for my understanding. You are in fact right that I made the mistake of using the PK the for the houseBid which in my mind was supposed to be the Bid Amount hence the decimal type. Therefore it's now obvious why it made it a Double because it was a decimal type chosen by myself... Unclear setting up as to what fields I actually wanted which I've now done correctly which for anyone reading this in the future:

    bidId (Int) (PK)

    bidAmount (int) 

    other fields etc.