Force required field to default even if user isn't allowed to modify the field

Started by tfs, August 29, 2012, 07:26:23 PM

Previous topic - Next topic

tfs

I have a custom field dropdown called Billing Code.  I have it set to default to a particular value, however since the users are allowed to see the field but not allowed to modify the field, when they create tickets the field doesn't get populated with the default.

Is there any way to get around that just for new tickets?  I don't want users editing that field, but I want it to default to one of the values.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

venguard223


tfs

Thanks, will try to figure another way.  Can something like this be done via SQL triggers, a la MSSQL?  I'll have to fudge around PHPMyAdmin and see if there's anything like that.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

venguard223

I suppose you probably could create a trigger on new rows being created in the tickets table, and if the id_dept is what you are looking for, it would create a resulting row in the custom fields table. Doable in that respect, but it's a bit out of my league (I'm strictly an OLTP-monger, not an OLAP person)