Solved

Generation process calculated columns

  • 12 January 2023
  • 5 replies
  • 67 views

Userlevel 4
Badge +11

Where in the generation process are calculated columns generated and written to the database?

This question came to me after I saw that you can modify the calculation query at Subjects

 

Changing a calculated column is not a GUI but DB change, right? 

 

icon

Best answer by Mark Jongeling 13 January 2023, 11:11

View original

This topic has been closed for comments

5 replies

Userlevel 7
Badge +23

Hi Dennis,

Yes, Calculated columns are indeed stored on the database and do require an upgrade after changing.

Reason the fields is mutable here is that expression fields are no problem to change.

Userlevel 4
Badge +11

Hi Mark, 

That expression fields are modifiable in subjects I understand. However, the column "pallet_price_1_incl_diesel" is not an expression field but a calculated column. Wouldn't it make more sense that this is only modifiable in the data model so that the SF recognizes this as a model change and picks it up with this in the upgrade script? 

Subjects > Columns > Calculation type > Calculated column > Query

 

Data model > Columns > Calculation type > Calculated column > Query

 

Userlevel 7
Badge +23

Hey Dennis,

That would indeed be a great solution, but sadly we currently cannot make this query read only only on this screen for a specific Calculation type. That would require some additional model objects just to let the Layout procedure know when to make this query field read only.

An alternative could be that this screen prevents an update of the query in all cases, so no matter which Calculation type is chosen, the query cannot be edited here. I'll discuss this with the team to see what would be a suiting solution.

Userlevel 4
Badge +11

I am curious about the outcome. I especially wanted to make sure I understood the operation of calculated columns correctly.

Userlevel 7
Badge +23

Discussed it a bit, it seems that this was a result of allowing Column configuration changes inside the Subjects screen. As this field is more Data model than GUI, we'll make the query field read only for this screen for the 2023.2 release.