Default field value?

Please login to reply  Page: « < 1 of 1 > »
06 Jul 2010 - 17:08687
Default field value?

Is there a way to set default field value in Blaise language?
I'm trying to create a DATE field with the initial value set to the current date, but if I do this in the rules section DEP doesn't allow me to change the value.

Fields
    mydate: DATETYPE
    amt : integer
Rules
    mydate := SYSDATE
    mydate.ASK
    amt.ASK
    {doing like this Blaise resets mydate to SYSDATE as soon as I set the focus on amt. 
     I want to have initial value set to SYSDATE but being able to change the value to anything I want}


06 Jul 2010 - 18:56688
Blaise Forum: New post in thread Default field value?

If you put an if statement around the original computation as shown below, it should only compute the date when it is empty.

Fields
    mydate: DATETYPE
    amt : integer
Rules
    mydate.ASK
  IF mydate = EMPTY THEN
    mydate := SYSDATE
  ENDIF
    amt.ASK



07 Jul 2010 - 16:13691

Yeps, it works fine. Thank you.



Please login to reply  Page: « < 1 of 1 > »