Skip to main content
Solved

Autogenerated fields


ElenaTodirenchi
Vanguard
Forum|alt.badge.img+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? 

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?

View original
This topic has been closed for replies.

4 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+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


ElenaTodirenchi
Vanguard
Forum|alt.badge.img+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.


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3945 replies
  • Answer
  • June 17, 2022
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?


ElenaTodirenchi
Vanguard
Forum|alt.badge.img+1

It worked, thank you ðŸ˜ƒ


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings