This topic is locked

insert 'null' After record update

8/20/2007 11:53:13 AM
PHPRunner General questions
F
farago author

on Edit page - After record update

Need to :

  • insert "null" into a field that has been edited and its value left empty
  • Add now(); to "last mod" field after record is updated



Have also tried also to use "Function: now()" in default field value - neither of these solutions seem to be working - sorry for noob questions.
Using Build 291 -
if( $values[ "disc" ] == "''" )

{

$values[ "disc" ] = "null";

}
if( $values[ "disc_memb" ] == "''" )

{

$values[ "disc_memb" ] = "null";

}
$values["last mod"] = now();
return true;

F
farago author 8/20/2007

Ok - got date to work by making it "Before record updated" event
$values["last_mod"] = now();