On your layout, if you check Layout Setup... (Enter layout mode). What text appears in "show records from"?
My concern is that your script does not directly refer to any data in SupplierDetails. It refers to data via the table occurrence "supplierDetails 2". This implies two occurrences of SupplierDetails. If your layout is based on SupplierDetails instead of SupplierDetails 2, there is a relationship involved that could be preventing access to the field.
You can also simplify this part of your script:
Everything above the # line can be replaced with:
If [ Get ( ScriptParameter ) = "Supplier" ]
Set Field [Supplier Details 2::SupplierSendDataFile ; Not Supplier Details 2::SupplierSendDataFile ]
But note that I am also using Supplier Details 2. If this is not the Tutorial: What are Table Occurrences? on which your layout is based, you should either change the setting in Layout setup or modify the reference to supplier details 2 here in your script.
That fixed the problem!
The layout was showing records from SupplierDetails, not SupplierDetails 2. Ammending the script sorted it.
I tried the simplification, but I guess it's not a function that is available in FileMaker Pro 10?
I could have spent the next month looking at this and not spotted my error.
This should work fine in Filemaker 10. What happened when you tried that option?
This option assumes that SupplierSendDataFile is a field of type number. It may not work if it is of type text.
It does - just me being a little slow. Once the incantation was entered correctly, it ran fine.
Thanks again for your patience - that's two more learning points to tuck away for future use!