Skip to main content

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. 

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


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…  

 


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?


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)?


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.