I'm wondering if anybody has a technique for achieving this? Basically, we have a concatenated name field that calculates a result like this:
Currently, the concatenated name updates if you edit one of the individual name fields using a formula something like this:
~firstName = fname ;
~lastName = lname ;
~noFirstName = IsEmpty ( ~firstName ) ;
~noLastName = IsEmpty ( ~lastName ) ;
~separator = Case ( ~noFirstName or ~noLastName ; Null ; ", " )
~lastName & ~separator & ~firstName
This is essentially controlling for situations where we have only a first or last name, no insertion of a separator is to occur in this case.
Is it possible to have this work in reverse using only auto-enter calcs? In other words, if you edit the concatenated name, the first and last name individual fields update accordingly. I've tried a few things, but so far I've only been able to get the updates to work one way or another, not both ways. The last thing I tried was something like
~separator = ", " ;
~nameList = Substitute ( fullName ; ~separator ; ~carriagereturn ) ;
~firstName = GetValue ( ~nameList ; 2 ) ;
~lastName = GetValue ( ~nameList 1 )
But I can't quite get it to work the way I want; the updates either don't happen at all, or will only happen one way if I toggle the Do Not Replace Existing Value option on one field or the other.
I imagine I could probably get this to work using a script trigger; but I'm curious if somebody has a technique for this that works at the auto-enter calc level?