Solved

Default value via expression

  • 23 March 2022
  • 5 replies
  • 141 views

Userlevel 5
Badge +16
  • Thinkwise Local Partner Brasil
  • 389 replies

Hi. Today one of my trainees added in the model the default value via expression and he added the getdate() function as mentioned in the documentation: https://docs.thinkwisesoftware.com/docs/sf/data_model#default-value

But although it says SQL server is the only one to support it, it create a very strange insert statement at upgrade time, which is not accepted by SQL server. 

select 
t1."DataCadastro"(getdate()) as "DataCadastro"
from __Processos__ t1

It looks like something was not generated correctly in the SF. 

icon

Best answer by Freddy 23 March 2022, 12:55

View original

This topic has been closed for comments

5 replies

Userlevel 7
Badge +23

Hi Freddy, Can you share the Software Factory configuration of the column? That helps with reproducing the issue.

Userlevel 5
Badge +16

Hi Mark. 

I already fixed the issue, so I am trying to recreate the issue..  and I can't.. when I try to recreate what happend it doesn't… you can use the getdate() and it works..   but for some reason within our upcycled project it created something very strange…  So forget it for now, there must have been something else as well I guess…  

 

Userlevel 5
Badge +16

Hi Freddy, Can you share the Software Factory configuration of the column? That helps with reproducing the issue.

It has something to do with a certain way of doing it..  I just had the same issue..

 

 

Maybe this happens when it was a normal field before?

Userlevel 7
Badge +23

Since I'm on holiday right now, I do suggest creating a ticket for this in TCP. Reproduction method would be great 👍

Perhaps this is a Calculated field (Function)?

Userlevel 5
Badge +16

Since I'm on holiday right now, I do suggest creating a ticket for this in TCP. Reproduction method would be great 👍

Perhaps this is a Calculated field (Function)?

It's a default expression.  And it tends to happen after an Upcycle. Which has another odd thing, because it also always tends to generate an upgrade script even in between the versions nothing really changed.