Apologies for the numerous questions and thank you for your detailed answers always.
Having worked with MS Lightswitch previously, there was a possibility to define a “calculated attribute” for an entity.
This allowed for setting the attribute’s value via code, without specifying any event / timing when this code should be run.
Does this exist in Cuba?
As background for this question, this is what I am trying to achieve:
Let’s say I have a Customer entity with a Rank attribute.
The Rank attribute is a related entity (combination), with RankName and EffectiveDate attributes.
So, Customer “Joe” could have 2 Rank attributes:
(1) RankName “Standard”, EffectiveDate “2015/5/1”
(2) RankName “Premium”, EffectiveDate “2016/8/1”
I would like to show in one table my Customer attributes AND the CURRENT (most recent rank smaller or equal to TODAY) rank.
So I was thinking of adding a “Calculated Attribute” in my Customer entity fetching the current effective rank.
Alternatives I can think of are:
- Create a persistent attribute for Customer, and fetch current rank before table display
- Use addGeneratedColumn?
Which would you recommend?
Thank you for your help,