K1200 Posted January 21, 2012 Posted January 21, 2012 I'm working to add a user-selected "switch" that designates whether to store an image in a container field, or only a reference. The store and display parts are working (i.e., stored images do display properly). But I thought I would see a clear indication of what was actually in the container (image or file path). Instead, a calculated field (GetAsText(Container)) shows either the image size ... or only the inserted file name (no path). Attached is a screen capture of my test results. Lamb and Blue were inserted using a right click + Insert Picture + Store Reference operation. The others were done without the Store Reference designation. Shouldn't the calculation for ones that (supposedly) contain references result in something like "filewin::c:/directory/image001.png"? I read quite a bit before I implemented this, and I thought I knew what to expect. What have I missed? Thanks for any help.
comment Posted January 21, 2012 Posted January 21, 2012 What do you see when you click into the field?
Raybaudi Posted January 21, 2012 Posted January 21, 2012 But I thought I would see a clear indication of what was actually in the container (image or file path). Try to change the calculation with: Case( ValueCount ( Container ) > 1 ; "Referenced" ; ValueCount ( Container ) ; "Stored" )
Vaughan Posted January 21, 2012 Posted January 21, 2012 The GetAsText() function will return multiple paragraph-delimited values, so you may only be looking at the *first* value it returns.
K1200 Posted January 22, 2012 Author Posted January 22, 2012 The GetAsText() function will return multiple paragraph-delimited values, so you may only be looking at the *first* value it returns. Thanks to you all. That was it. I made my test field editable and can now see the full result of the GetAsText function. I hope these examples help others resolve problems with the undocumented format of the function's results. Not only does FM's description of the function fail to mention multiple lines, it claims that embedded container data returns a question mark, which does not appear to be the case. I do appreciate your help.
Recommended Posts
This topic is 4747 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