Skip to main content
Solved

Default value via expression


Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 528 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. 

Best answer by Freddy

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…  

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

5 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23

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


Freddy
Forum|alt.badge.img+16
  • Author
  • Thinkwise Local Partner Brasil
  • 528 replies
  • Answer
  • March 23, 2022

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…  

 


Freddy
Forum|alt.badge.img+16
  • Author
  • Thinkwise Local Partner Brasil
  • 528 replies
  • April 20, 2022
Mark Jongeling wrote:

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?


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


Freddy
Forum|alt.badge.img+16
  • Author
  • Thinkwise Local Partner Brasil
  • 528 replies
  • April 22, 2022
Mark Jongeling wrote:

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. 


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