FileMaker Pro: Set Cell & Style

Hi,

I wrote a script to synchronise data between different versions of FM Tables.

When I use “set cell myFieldname to myValue” the style of the field is “Geneva;12”

Is there a way to avoid that ?

TIA

When you apply a value to a cell, you’re passing a string, without style information… So, it assumes the default style for that field (as you can define in layout mode).
If I define “font Gadget, size 24, color red” for a field in layout mode, any data I place in that cell assumes that style automatically…

Try “set cell myFieldname to myValue as text”

The last option should be the “do menu” way…:

go to cell x
do menu menu item "Select All" of menu "Edit"
--> etc, etc.

But this may be problematic… :rolleyes:

tell application “filemaker pro”

set x to cell “cell1” of current record of database “olddatabase.fp5” as styled text
tell database “newdatabase”
set cell “cell1” of current record to x
end tell
end tell

tell application “filemaker pro”

set x to cell “cell1” of current record of database “olddatabase.fp5” as styled text
tell database “newdatabase”
set cell “cell1” of current record to x
end tell
end tell