Sorry my eyes blurred on the "Parse" function. What does it do?
I have done a similar idea with a boolean field that I set [when I fill the Container] to indicate the Container fields as FULL or EMPTY. I used a Numeric type field so that I can use a small, fast LIST type layout without showing the Container contents. Then if the user is intersested, click on the FULL button to see just that record.
I would test a simple version of your function to see what part is the culprit.
I can see ways to simplify your calculation. (This is not, technically, a script, BTW.)
But I don't see any obvious errors in it that would explain why Not IsEmpty ( ) would return the wrong value.
Perhaps the issue lies elsewhere.
What kind of field is "add Image"?
How are you implementing this calculation?
Its a container field.
This is part if a longer script. It must be Oneida the other sub scripts. I'll check it out by elimination.
I dissected that script with a lot of difficulty. There seems to be a lot of repetition. I have two separate methods for parsing the URL of the image in twice. I guess I could simplify be having only one method of parsing.
I'm not convinced that it's the parsing.
The if function should prevent this calculation from even attempting to parse anything if the field is not empty.
Breaking up this calculation into smaller pieces and checking the results returned by each piece may be informative.
For some reason it doesn't seem to be replacing my images any more. If the cotainer is empty it puts an image in it. If it is not empty it returns me an error message 1631 telling me the connection failed.