function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
testuser 34379testuser 34379 

salesforce needs a Unique, required option capability for formulas that concatenate two fields

VinayVinay (Salesforce Developers) 
You can create a formula field that will display the concatenated value and formula field would be of type text and would have formula similar to
FieldName1+ ' ' +FieldName2

Check below reference

https://help.salesforce.com/articleView?id=bi_integrate_data_prep_recipe_formula_field_stringFunctions_concat.htm&type=5

Thanks,
testuser 34379testuser 34379
Yea but I want it to throw an error if the resulting value isn't unique. My basic intention is to ENSURE two other fields in the table that I concatenate together are unique (idc about individually). 
VinayVinay (Salesforce Developers) 
I don't think this is possible, you might need to think of custom logic implementation.
Andrew GAndrew G
It will require a before insert / update trigger.  

Using the value in the field, do a SOQL.  If you get any results, throw an error and stop the save.


regards
Andrew
 
CharuDuttCharuDutt
Hii testuser 34379..


it can be done with formula field 
field 3 will be Data TypeFormula type text
Data TypeFormula  


field1__c + '' + field_2__c
 Please mark it as best answer if it helps