No announcement yet.

Insert a value in database

  • Filter
  • Time
  • Show
Clear All
new posts

  • Insert a value in database

    In the insert form, how can I pre-define one of the values to be inserted without the interference of the user?
    e.g. the user wants to insert a new order that consists of orderId, productId, price, discount .. etc. I want the orderId to be inserted automatically (from a variable) and the user inserts the rest of the record...

    Best Regards,

  • #2
    An orderid I would generate from an database autosequence. But you can alway use the initial value of the field properties which will be filled when you insert a record. Useually used when the value needs to be showed. If you need the number generated as late as possible (I still recommende autosequence) then you can use the onbeforeinsert event and fill you variable there. Just move the variable off your screen to hide it for your users and apply your code in the event:

    {ordernumber}=something here.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /