TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
Initial value
Be able to define an "initial" value (literal) in addition to a "default" (formula dependant) value of a column.
ID
914
Category
TeamDesk
Author

Robert Gustavsson
Date Created
10/14/2015 11:53:17 AM
Date Updated
10/15/2015 7:27:39 AM
Status
New Idea
Score
10
Promoted By
Robert Gustavsson
Comments
Philipp Matuschka (MMB) 10/15/2015 12:18:54 AM
Robert
I think I am going to promote this one but could you explain the rationale to make sure we ate thinking of the same thing
Robert Gustavsson 10/15/2015 2:25:35 AM
For example, one may want a column named "total_items" to be the sum of "blue_items" and "red_items". However, we may want to have "total_items" initiated to "1" because that is our default number, regardless of color, until "blue_items" or "red_items" has been specified.
Slava Shinderov  Staff  10/15/2015 2:36:16 AM
@Robert please try following "Default/Calculate" formula:

If(RecordId() = "0", 1, [blue_items] + [red items])
Robert Gustavsson 10/15/2015 2:38:22 AM
Thanks
Robert Gustavsson 10/15/2015 3:15:11 AM
Unfortunately that didn´t work as desired (when used as formula for "default"). The sum stays at the initial "1" until the record is saved and edited a second time. We can´t convert the sum to a formula column, in our particular application, since we want to be able to bypass [blue items] and [red items] and instead input a total number of items (of "unspecified color") AND have this value initiated to "1". I'm quite sure there are other scenarios where "initial" values separate from "default" values would be beneficial.
Slava Shinderov  Staff  10/15/2015 4:29:07 AM
@Robert "Default/Calculate" formula is "calculated" when record is created and/or referred columns are changed, so you just need to change the formula as you need.
Maybe If([blue_items] + [red items] = 0, 1, [blue_items] + [red items]) will work for you. It's hard to say for sure as we're talking abstractly.
In any case, it's not clear for me how an "initial" value can help if you can't clearly specify criteria when initial value should be used and when formula should be used. And if you can do that then, I guess, the default/calculate formula is enough since you can always modify its as needed.
Robert Gustavsson 10/15/2015 6:18:40 AM
An "initial value" would be applied to new records upon creation, until "default value" overwrites as a result of other fields being modified. The formula above works well except the sum doesn't evaluate to zero if the items are changed back to zero. My intention is to have the sum = 1 only until [X_items] are modified.
Robert Gustavsson 10/15/2015 6:23:01 AM
For now I'm using Max(1,[blue_items] + [red items]) which gives a simular result as your suggestion.
Philipp Matuschka (MMB) 10/15/2015 7:23:49 AM
Robert im glad I asked because this conversation has ended up being different from what I expected.

Slava what I would find good is if when adding a new column to an existing table with many records in it I could specify the initial value of that column. So for example add new Columb status and set all existing records to value Active
Slava Shinderov  Staff  10/15/2015 7:27:39 AM
@Philipp Please consider creating a formula column first and then convert it to the physical one. I guess, it will do the job you need.
Feedback
 
Back to Search Results