Solved

Autogenerated fields


Userlevel 1
Badge +1

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? 

icon

Best answer by Mark Jongeling 17 June 2022, 13:36

View original

This topic has been closed for comments

4 replies

Userlevel 1
Badge +1

It worked, thank you 😃

Userlevel 7
Badge +23

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?

Userlevel 1
Badge +1

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.

Userlevel 7
Badge +23

Hi,

To me it is a bit unclear of what you would like to create. Could you explain it a bit more, maybe even add some images?

If you mean to changing the value of one field should trigger another field's value to change too, then yes the Default logic can help as it is called upon adding/editing and after each time a field changes value. More info here: https://docs.thinkwisesoftware.com/docs/sf/business_logic