i have two tables TPS Interchange and TFM Trinary. Primary key of TFM Trinary is foreing key of TPS Interchange which is Trinary_id . TFM Trinary contains key Column which has some text data like TESTCALL, TESTEMAILalso created a record type TPS Interchange and record type TFM Trinary . Now i want to create an custom field like if 'recordType!TPS interchnage.Trinary_id = 15 then it showsTFM Trinary .key= TESTCALL if 'recordType!TPS interchnage.Trinary_id = 20 then it showsTFM Trinary .key= TESTEMAIL otherwise Default nullHow to do this ?
Discussion posts and replies are publicly visible
when creating a custom field make sure to select write your own expression and Real-time evaluation as it will allow you to use related record field.then by the use of a!customFieldMatch() we can achieve this, for example ->
a!customFieldMatch( /*my 'recordType!TPS interchnage.Trinary_id*/ value: 'recordType!{42fe68dc-1205-4240-bb84-1cb3065c6210}AT temp2.fields.{7e0ab763-a70a-43c1-95c9-8304cc937922}tempId', equals: 15, then: "TESTICAL", equals: 20, then: "TESTEMAIL", default: "null" )
Klaus34 Any of the above would work here considering that the 'Trinary_id' is present in the base record where we are creating the custom record field so we do not need related record fields. So we can use any of them. The real-time will need more evaluation time as it will evaluate the values in the real-time. And sync time is calculated when the data is synced.
For a more performant view, I will advise using sync time evaluation along with if() function to check.
yes, true, that would be something like this ->
if( rv!record['recordType!{42fe68dc-1205-4240-bb84-1cb3065c6210}AT temp2.fields.{7e0ab763-a70a-43c1-95c9-8304cc937922}tempId'] = 15, "TESTCALL", if( rv!record['recordType!{42fe68dc-1205-4240-bb84-1cb3065c6210}AT temp2.fields.{7e0ab763-a70a-43c1-95c9-8304cc937922}tempId'] = 20, "TESTEMAIL ", "" ) )