Hello, I want to create some defaults in functionality for some fields and to be able to change them after. Is it possible or do I need to use something else?
Solved
Autogenerated fields
Best answer by Mark Jongeling
ElenaTodirenchi wrote:
So I have a default that is completing some fields. I want to be able to modify the values completed by the default. I am not able to do that now as they are automatically overwritten by the default's values.
You can add a IF statement (or where clause) to the set/select query that prevents the overwrite of the column value. For example:
if @customer_first_name is not null
and @customer_last_name is not null
and @customer_name is null -- Not set yet
begin
set @customer_name = @customer_first_name + ' ' + @customer_last_name
end
Does that help out?
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.