dbTalk Databases Forums  

Calculation on container

comp.databases.filemaker comp.databases.filemaker


Discuss Calculation on container in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aladino
 
Posts: n/a

Default Calculation on container - 07-12-2007 , 11:03 AM






Is there a way to know if a container field has changed data? I mean,
can I get a checksum or data dimension in byte or data type (image,
sound, etc...) and then for image the size in pixel...

Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Calculation on container - 07-12-2007 , 03:48 PM






In article <1i15ghy.1jsy6iw2domk4N%borgobello-NO (AT) SPAM-adriacom (DOT) it>,
borgobello-NO (AT) SPAM-adriacom (DOT) it (Aladino) wrote:

Quote:
Is there a way to know if a container field has changed data? I mean,
can I get a checksum or data dimension in byte or data type (image,
sound, etc...) and then for image the size in pixel...
It depends what you mean by "changed data" - how does it change?

You can test a Container field using the same functions as with any
other field type.

For example, you can test whether or not a Container field is empty by
using either:

If [ContainerField = ""]
Message ["ContainerFiled is empty"]
End If

or:
If [IsEmpty(ContainerField)]
Message ["ContainerFiled is empty"]
End If


You can test whether one Container field has the same data as another
Container field (or Global container field) by using:

If [ConterField_A = ContainerField_B]
Message ["ContainerFiled_A and ContainerField_B
have the same data."]
End If


If the Container field is linked to it's data rather than storing it,
then you should be able to use the directory path to the file to grab
the filename extension and work out what type of data it is.
ie.
If [Right(filepath, 3) = "jpg"]
Message ["ContainerFiled holds an image"]
End If

I'm not sure how you get that file path though.


You don't say what version of FileMaker, but as far as I know there is
no ability in any version to generate checksums from Container field
data, although there may be an extra plug-in that adds such an ability.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
Chris Brown
 
Posts: n/a

Default Re: Calculation on container - 07-12-2007 , 07:17 PM



Aladino wrote:
Quote:
Is there a way to know if a container field has changed data? I mean,
can I get a checksum or data dimension in byte or data type (image,
sound, etc...) and then for image the size in pixel...

You could probably use DataLog (from NightWing ) and a calc to flag for
modificationdate/time changes. That would flag the same data been put in
again asa change, i.e. that there had been a 'change' event.


regards

Chris


Reply With Quote
  #4  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Calculation on container - 07-14-2007 , 09:22 AM



Easy, and you don't need an external.

Just set up a text field with an auto-enter calculation:

MyContainerField & Get (CurrentTimeStamp)

Deselect "Do not replace existing value..."

The calc will change value only when the container field is modified.

If for some reason you need to know the size of the image (in pixels) then
you can store it as a reference; the dimensions are stored as the first line
of data returned by

ContainerData (calculation, text result) =
MyContainerField

e.g.:

size:320,240
image:myimage.jpg
imagewin:/D:/Desktop/myimage.jpg




"Chris Brown" <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote

Quote:
Aladino wrote:
Is there a way to know if a container field has changed data? I mean,
can I get a checksum or data dimension in byte or data type (image,
sound, etc...) and then for image the size in pixel...


You could probably use DataLog (from NightWing ) and a calc to flag for
modificationdate/time changes. That would flag the same data been put in
again asa change, i.e. that there had been a 'change' event.


regards

Chris



Reply With Quote
  #5  
Old   
Chris Brown
 
Posts: n/a

Default Re: Calculation on container - 07-14-2007 , 07:19 PM



Bill Marriott wrote:
Quote:
Easy, and you don't need an external.

Just set up a text field with an auto-enter calculation:

MyContainerField & Get (CurrentTimeStamp)

Deselect "Do not replace existing value..."

The calc will change value only when the container field is modified.

If for some reason you need to know the size of the image (in pixels) then
you can store it as a reference; the dimensions are stored as the first line
of data returned by

ContainerData (calculation, text result) =
MyContainerField

e.g.:

size:320,240
image:myimage.jpg
imagewin:/D:/Desktop/myimage.jpg




"Chris Brown" <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote in message
news:f76gbb$e98$1 (AT) aioe (DOT) org...
Aladino wrote:
Is there a way to know if a container field has changed data? I mean,
can I get a checksum or data dimension in byte or data type (image,
sound, etc...) and then for image the size in pixel...

You could probably use DataLog (from NightWing ) and a calc to flag for
modificationdate/time changes. That would flag the same data been put in
again asa change, i.e. that there had been a 'change' event.


regards

Chris



Hi Bill,

that's a handy way to grab the file name. (I only parse the filename
when I import...)

The text field records the change, something is needed to compare to,
i.e to track the changes, the DataLog is handy; or a variation field...



The second part doesn't work for me:
calc field, text result, = container
I just get teh file name

<<
If for some reason you need to know the size of the image (in pixels) then
you can store it as a reference; the dimensions are stored as the first
line
of data returned by

ContainerData (calculation, text result) =
MyContainerField
Quote:

regards

Chris





Reply With Quote
  #6  
Old   
Matt WIlls
 
Posts: n/a

Default Re: Calculation on container - 07-15-2007 , 05:25 AM



In article &lt;f7bp7d$m8m$1 (AT) aioe (DOT) org&gt; Chris
Brown&lt;cbrown (AT) medicine (DOT) adelaide.edu.au&gt; wrote:

Quote:
If for some reason you need to know the size of the image (in
pixels) then you can store it as a reference; the dimensions are
stored as the first line of data returned by

ContainerData (calculation, text result) =
MyContainerField
I do want the size of the image.

I have tried everyhing I can think of, and do not get what you
describe.
Imported a folder of images as reference. Calculation returned as text
in all cases is "image:/Path/to/Folder/FileName.JPG"
Same if not as reference.

Matt






Reply With Quote
  #7  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Calculation on container - 07-15-2007 , 08:08 AM



Quote:
The text field records the change, something is needed to compare to, i.e
to track the changes, the DataLog is handy; or a variation field...
There are a variety of ways to track the changes made (i.e., compare to a
previous state) that do not require a plugin. I'm not saying anything
against DataLog but if it's only the one field you care about then why go to
the expense and added complexity of an external?

Quote:
The second part doesn't work for me:
calc field, text result, = container
I just get teh file name
You must add "by reference only" in order to get the image size and file
path information. If the file is not an image, you will not get the pixel
dimensions. If the field is not formatted to display multiple lines, you
will not see the file path.




Reply With Quote
  #8  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Calculation on container - 07-15-2007 , 08:18 AM



Unfortunately, FileMaker operates slightly differently when you import a
FOLDER of images, versus a single image. It does not record the pixel
dimensions in the container field when importing a folder.

It's impossible to get a file path in the container field if you are not
importing as reference (folder or single). FileMaker simply doesn't store
that there when is has possession of the actual file. However, you can put
the file path into a separate field. Perhaps you had it mapped accidentally.

If you have a folder of images and need to obtain the pixel size of each,
you can do one import of the folder to obtain the path to each image (but
don't import the pictures) then cycle through the imported records with a
script which does the one-by-one import by reference of each image as
specified by the path.

Quote:
I do want the size of the image.

I have tried everyhing I can think of, and do not get what you
describe.
Imported a folder of images as reference. Calculation returned as text
in all cases is "image:/Path/to/Folder/FileName.JPG"
Same if not as reference.



Reply With Quote
  #9  
Old   
Matt WIlls
 
Posts: n/a

Default Re: Calculation on container - 07-15-2007 , 10:04 AM



I'm surely missing something.

Whether manually or using a script, the only image option available is
in importing a full folder.
Importing a single file, there's no image option available, and all I
get is the text representation of the file (such as you would see if
you opened a JPG in a text editor.
Nowhere do I see recognizable representation of the image size.

I also tried Insert Image, using the same script variable to specify
the file. The image is stored, but that's all.
Matt

In article &lt;9ridnbLaZs-RggfbnZ2dnUVZ_gWdnZ2d (AT) comcast (DOT) com&gt;
"BillMarriott" &lt;wjm (AT) wjm (DOT) org&gt; wrote:

Quote:
Unfortunately, FileMaker operates slightly differently when you
import a FOLDER of images, versus a single image. It does not record
the pixel dimensions in the container field when importing a folder.

It's impossible to get a file path in the container field if you are
not importing as reference (folder or single). FileMaker simply
doesn't store that there when is has possession of the actual file.
However, you can put the file path into a separate field. Perhaps you
had it mapped accidentally.
If you have a folder of images and need to obtain the pixel size of
each, you can do one import of the folder to obtain the path to each
image (but don't import the pictures) then cycle through the imported
records with a script which does the one-by-one import by reference
of each image as specified by the path.

I do want the size of the image.

I have tried everyhing I can think of, and do not get what you
describe.
Imported a folder of images as reference. Calculation returned as
text in all cases is "image:/Path/to/Folder/FileName.JPG"
Same if not as reference.






Reply With Quote
  #10  
Old   
Chris Brown
 
Posts: n/a

Default Re: Calculation on container - 07-15-2007 , 11:10 PM



Matt WIlls wrote:
Quote:
I'm surely missing something.

Whether manually or using a script, the only image option available is
in importing a full folder.
Importing a single file, there's no image option available, and all I
get is the text representation of the file (such as you would see if
you opened a JPG in a text editor.
Nowhere do I see recognizable representation of the image size.

I also tried Insert Image, using the same script variable to specify
the file. The image is stored, but that's all.
Matt

In article &lt;9ridnbLaZs-RggfbnZ2dnUVZ_gWdnZ2d (AT) comcast (DOT) com
"BillMarriott" &lt;wjm (AT) wjm (DOT) org> wrote:

Unfortunately, FileMaker operates slightly differently when you
import a FOLDER of images, versus a single image. It does not record
the pixel dimensions in the container field when importing a folder.

It's impossible to get a file path in the container field if you are
not importing as reference (folder or single). FileMaker simply
doesn't store that there when is has possession of the actual file.
However, you can put the file path into a separate field. Perhaps you
had it mapped accidentally.
If you have a folder of images and need to obtain the pixel size of
each, you can do one import of the folder to obtain the path to each
image (but don't import the pictures) then cycle through the imported
records with a script which does the one-by-one import by reference
of each image as specified by the path.

I do want the size of the image.

I have tried everyhing I can think of, and do not get what you
describe.
Imported a folder of images as reference. Calculation returned as
text in all cases is "image:/Path/to/Folder/FileName.JPG"
Same if not as reference.





I get the same, having tried the same variations


Chris


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.