jwnacnud Posted October 22, 2005 Posted October 22, 2005 FMP 7 (OSX and winxp) I have a text field that is based on the filename of the image in the container field: text_field_1=Product_Image. Works great in osx. It gives me the file name as soon as I place an image in the container field. My problem is that it doesn't work under winxp the result of the exact same field is: ? It doesn't give me anything, just "?". I have tried exporting the data and it just exports a "?" as well. Any ideas. The text field is a calculation so it updates automatically when I change the container field contents. Thank you in advance. Jeffrey Duncan [email protected]
CyborgSam Posted October 22, 2005 Posted October 22, 2005 Please show us the calculation that gets the filename into the text field. Is the calc unstored so it can update? FileMaker treats backslashes in calculations as an escape character, your calc may be misinterpreting the in Windows file paths as an escape character.
jwnacnud Posted October 22, 2005 Author Posted October 22, 2005 Nothing complex here: If (IsEmpty(Product Image);"image_coming_soon.gif" ; "product_images/" & v_manufacturers_name & "/" & Product Image ) I get this on Mac OS X: product_images/Freud/freud1013.jpg I get this on WinXP (with the same database) product_images/Freud/? I have tried removing the if statement and just using "product_image" - this works fine on os x, not on winxp. Any ideas?
CyborgSam Posted October 22, 2005 Posted October 22, 2005 How is the field "Product Image" calculated or set?
jwnacnud Posted October 23, 2005 Author Posted October 23, 2005 Product_image is the container field. I right-click on the field to "insert image". Thank you for your help
Kent Searight Posted October 23, 2005 Posted October 23, 2005 Have you tried: GetAsText(Product Image) Also, as Cyborg Sam pointed out, Windows uses , not / like Mac when naming paths. This could have something to do with the inability to export.
jwnacnud Posted October 23, 2005 Author Posted October 23, 2005 I have tried it numerous ways. Let me clarify: Product_Image is a container file. This is where I place my images in the database. v_products_image is the calculation that displays the name of the image file in Product_image. to simplify things, i used the following calculation: v_products_image = Product_Image (calculation result must be text) This works under osx but not under winxp. give it a try. Just two simple fields. In WinXP it gives me a ? - in OSX it shows the image filename.
Fenton Posted October 23, 2005 Posted October 23, 2005 Maybe you should use the explicit GetAsText ( Product_Image ), as Kent suggested. I also see that I can get away with just a calculation with the result text on a Mac. But it's kind of fuzzy programming. Maybe the PC requires an explicit coercion?
Kent Searight Posted October 23, 2005 Posted October 23, 2005 Maybe the PC requires an explicit coercion? What does "explicit coercion" mean?
jwnacnud Posted October 23, 2005 Author Posted October 23, 2005 I was using GetAsText originally. When I found that it performed in the same manner as just using the field name I simplified the calculation and got rid of GetAsText. If you have a WinXP installation, give it a shot. I would love to have it work for someone.
Kent Searight Posted October 23, 2005 Posted October 23, 2005 Unless I'm missing something, using GetAsText() will do what you want on Windows and on Mac. Here's an example I created in Windows and tested on a Mac. GetImageName.zip
Fenton Posted October 23, 2005 Posted October 23, 2005 explicit type coercion: A programming construct (syntax) to specify that an expression's value should be converted to a different type. From: Free On-line Dictionary of Computing
Kent Searight Posted October 23, 2005 Posted October 23, 2005 Thanks, Fenton! I bookmarked the dictionary site for future reference.
Recommended Posts
This topic is 7037 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