Geeksharka Posted May 16, 2003 Posted May 16, 2003 I'm sure this is pretty straight forward, but my brain has sadly lost its agility.... I need to create a calc field that concatenates various text elements, some static, some variable. Easy enough. The status elements are quoted into the concatenation, and the variable elements come from fields. For example: "Please say hi to " & "NameFirst" & " " & NameLast & "for me." My problem however is when any of the static elements have quote marks (") in them. This happens for example when I need to concatenate some Applescripts, or HTML, etc. etc. For example: do shell script "curl http://www.yourdomain.com/brochure01.pdf > ~/desktop/sample.pdf; open ~/desktop/sample.pdf" Is a great little Applescript for grabbing stuff, but I'd like to make the doc that is curled from the URL a variable, by using a field in FMP. I usually would create a curl_filename field that is a calc like this: "do shell script "curl http://www.yourdomain.com/" & curl_filename & " > ~/desktop/sample.pdf; open ~/desktop/sample.pdf"" but the problem now is the double quotes.... FMP utilizes the quote marks to delineate static bits within the calc -- is there any clever way round this? Many thanks,
Ugo DI LUCA Posted May 16, 2003 Posted May 16, 2003 Hi, "I want to say" & ""Hello"" & "to Sharka" should do it. 4 quotes, 2 +2 ...
Geeksharka Posted May 16, 2003 Author Posted May 16, 2003 Hi, "I want to say" & ""Hello"" & "to Sharka" should do it. 4 quotes, 2 +2 ... Unfortunately, no. FMP sees: "I want to say" & "" hello "" & "to Sharka" and it assumes 'hello' is a fieldname, and can't find it. (hence the error it gives you when you try this).
Geeksharka Posted May 16, 2003 Author Posted May 16, 2003 Aha! Merci bien -- my brain was indeed not working.
Recommended Posts
This topic is 7932 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