Reputation: 3262
VLOOKUP( $ObjectType.I__c.Fields.ISO_Code__c,
$ObjectType.I__c.Fields.Name, Case__r.Account.BillingCountry) + '-' + IF(OR(TEXT(Case__r.Account.Type) = 'Cargo Agent',TEXT(Case__r.Account.Type) = 'C Associate') ,'C','P') + '-' + LEFT(Case__r.Account.ICode__c,7)
This allows me to upload something like this format JO-P-NA44694-2.pdf
but the user can also upload something like [[JO-P-NA44694-2]].pdf
or --JO-P-NA44694-2-][.pdf
. How can I stop that, and make the user only able to upload something like this JO-P-NA44694-2.pdf
Upvotes: 1
Views: 1975
Reputation:
use Regex something like this REGEX(Name, "[a-zA-Z0-9]{2}-[a-zA-Z0-9]{1}-[a-zA-Z0-9]{7}-[a-zA-Z0-9]{1}")
Upvotes: 1