Forum Discussion
DonLarson
2 years agoQrew Commander
BP,
I always do these from the low end so that the final answer is the max value allowed. Another business case is looking up Commission Rates
This will give you an answer in four rows and can easily add new values between them when HR policy changes or Compliance forces a different answer.
------------------------------
Don Larson
------------------------------
I always do these from the low end so that the final answer is the max value allowed. Another business case is looking up Commission Rates
If (
[Years Employed] < 0.75, 0,
[Years Employed] < 3, 5,
[Years Employed] < 8, 10,
[Years Employed] < 10, 10, 20
)
This will give you an answer in four rows and can easily add new values between them when HR policy changes or Compliance forces a different answer.
------------------------------
Don Larson
------------------------------
- BrianSeymour2 years agoQrew Cadet@Don Larson Yeah, your version may be a bit more performant, since I'd imagine most Employees haven't been with the company 8+ years, so the earlier conditions would be met first, thus, producing results a bit faster. Of course, I don't unfamiliar the data set, that's just a guess and probably a negligible performance boost.
I do like putting the default on it's own line though ;)
Anyway, I think the OP (BuildPro) probably resolved this one.
------------------------------
Brian
------------------------------- DonLarson2 years agoQrew CommanderBrian,
Putting the default and the comment line will pay you back in spades when you revisit it. I am putting lots of comments in formula fields and structure them by sections for //Variables, //Images, //URLs, //HTML, //Logic and //UI
It really helps when going back to a formula field that is 20 rows long never mind the 250 plus ones.
------------------------------
Don Larson
------------------------------- PrashantMaheshw2 years agoQrew Captain@Don Larson they way you are able to visualise the application is nothing short of amazing.
------------------------------
Prashant Maheshwari
------------------------------