Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Is there a way to Parse an email string?


bigzilla

Recommended Posts

I there a way to parse (break out) the name of the image from the rest of the information?

 

In the following example I would like to be able to have a field that would break out and show the “Mtn_Image.jpg” portion of the information and it would have to work on both Mac’s and Pc’s. Is that possible?

 

Hard Drive:Users:Bill:Desktop:3-31-05 eailer:HTML Folder:Mtn_Image.jpg

 

Thanks for your help,

 

Bill

Link to comment
Share on other sites

This could be simple if your filenames are always of the form

AAA_BBB.ext

 

then rightwords(pathname;3) will do.

 

 

But otherwise you'll have to take the string to the right of the last separator. And the catch is, path separators in windows are "/" aren't they? whereas in mac it's ":". so you'd have to check for the platform... Now Get(systemplatform) generates "-1" on my mac. I cannot test what the result is on windows, so here's a stab...

 

Code:


Let ( Separator = Case(Get ( SysteemPlatform) ="-1";":";"/");

Right ( PathName ; Length(PathName)- Position ( PathName ; Separator; 1 ; PatternCount ( PathName ; Separator) )))


 

kjoe

 

PS I just learned from the help viewer that Get(systemplatform) will generate -2 on Win2000 or XP. So the test is probably OK.

What I'm not clear on is what happens when you're on a mac linked to a win server, or the other way round. Get(systemplatform) will always give the result of the client machine, but what if the pathname is on the host?

Link to comment
Share on other sites

Hi guys,

 

Kjoe your parsing works great on a Mac, I'll try it on a Pc later.

 

Thanks for your help,

 

Bill

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use