Blue
White
Purple
Green
Red
Orange
Blue Light
White Light
Purple Light
Green Light
Red Light
Orange Light
Is there any way lets say to have a number auto populate a field with a number start from 1- whatever and when a new month starts have it start from 1 again?
Hi,you can do it for a field which is not a key field (it should be unique).Fill this custom field in the Before record added event on the Events tab.Here is a sample for MySQL:
if (date("j")!=1){$sql="select max(customID) as mx from TableName where month(DateField)=month(Now()) order by mx";$rs=CustomQuery($sql);$data=db_fetch_array($rs);$values["customID"]=$data["mx"]+1; }else{$values["customID"]=1; }