Compare contents of 2 container fields to see if different

Discussion created by DavidTinoco on Sep 29, 2016
Latest reply on Oct 5, 2016 by DavidTinoco

I have a table which has a container field that holds an excel file.


When the user clicks a button on this table's layout, the contents is exported to a temp location on the mac and then opened.


A dialog then appears telling the user to edit the file and then close the file before pressing continue (button1) in the alert dialog.


Once the user closes the file in excel (edited or not)


He then clicks "continue" in FileMaker and the script then loads the temp file into a global container field.


This is where I am stuck - how to compare the global container with the original container field, and if there are changes to the file, then ask if they want to replace it or not.


The global contents would then replace the container field and the script ends.


The problem is GetContainerAttribute( globalField ; "fileSize" ) is always different from GetContainerAttribute( containerField ; "fileSize" ) because the file was made recently and has a different byte size.


How else to compare the fields?