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
blakeLLblakeLL 

Turning a list into a list of hyperlinks

I have a custom field on accounts that stores a list of directories, for example: "letters1, letters2, letters3, statements" and I would like to have it turn into a list of hyperlinks that point to local network connections. I thought I would create a formula field that turns this list into:
HYPERLINK ("file://xxx/" & "letters1","letters1"), HYPERLINK ("file://xxx/" & "letters2","letters2"), HYPERLINK ("file://xxx/" & "letters3","letters3"), HYPERLINK ("file://xxx/" & "statements1","statements1")
 
Is there a way to work with a list and perform functions on it like this?
JakesterJakester
When you say list, do you mean a picklist? If so, then you're about to discover one of the most frustrating aspects of working with Salesforce. See this idea for an explanation of the limitations of working with picklists.
blakeLLblakeLL
I don't mean a picklist. I mean a text field for accounts that has values like "letters1" or "letters1,letters2" or "statements1,statements2,letters3" etc...
JakesterJakester
Ah-
 
Well, that's going to be difficult to work with, too. A better approach, if possible, would be to add a custom object that would be a child of the main object that could have multiple records for letters1, letters2, etc.
 
But, if you need to work with a comma separated string, you might be able to apply the find() function. It would be something like
Code:
if(contains(field_name__c,","),
   mid(field_name__c,0,Find(field_name__c,","))
   ""
)

Something like that would get the first text block out of the string. To get them all out and turned into html links, though is going to be extremely tough or maybe impossible using the formulas in SF. I can recommend a great consultant who could write an s-control that would do it.
 
-Jake