SimpleDesk

SimpleDesk! => SimpleDesk Support => Topic started by: tfs on August 29, 2012, 07:26:23 PM

Title: Force required field to default even if user isn't allowed to modify the field
Post by: tfs on August 29, 2012, 07:26:23 PM
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.
Title: Re: Force required field to default even if user isn't allowed to modify the field
Post by: venguard223 on August 29, 2012, 11:11:17 PM
Not without a fair amount of ugly workarounds IIRC.
Title: Re: Force required field to default even if user isn't allowed to modify the field
Post by: tfs on August 30, 2012, 03:20:56 PM
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.
Title: Re: Force required field to default even if user isn't allowed to modify the field
Post by: venguard223 on August 30, 2012, 03:42:34 PM
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)