Rich S Posted April 1, 2010 Posted April 1, 2010 Howdy, howdy: I have a field in my solution that records URLs, but it gets unwieldy when printing their paths, which can be very long. What I need is a separate calc field to truncate the text so everything after .com, .org, .net, etc., is deleted. How do I do that? TIA for your help! Rich
comment Posted April 1, 2010 Posted April 1, 2010 Haven't tested this, but try: Let ( [ adj = Substitute ( URL ; "//" ; "§" ) ; pos = Position ( adj ; "/" ; 1 ; 1 ) ; top = Case ( pos ; Left ( adj ; pos - 1 ) ; adj ) ] ; Substitute ( top ; "§" ; "//" ) )
Rich S Posted April 1, 2010 Author Posted April 1, 2010 Works like a charm! I wish I had 1% of the FMP smarts you have; I'd even settle for 0.5%. Now that I know it works, I'll need to sit down for a few hours to figure out _how_ it works. Thanks again!
Recommended Posts
This topic is 5408 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now