November 14, 200619 yr Hello Can someone quickly help me on this : Running Filemaker 8.5 advanced on XP I set up the import script - import from file - filewin:/C:/Documents and Settings/Desktop/test/$FileToOpen - Set variable : - name = $FileToOpen But now I'm stuck for the value ? I want the value to be either what is in the copy/paste memory or a value from a field. And in either case I want that that value is completed with the extention .txt Can you help me ? Kind regards
November 14, 200619 yr Hi chapeau_melon First off, how do you define if the filename is from copy/paste or a field? Below is an example of how the script could run, I have referenced a field called FileName, this is your field the filename is to be stored in. Also I have added a couple of steps at the beginning that get the information from the clipboard. I would suggest having two separate buttons on a layout, running slightly different scripts, or running the same script using script parameters. The script should run something like this: # The next two lines are for if you are using the clipboard. # Go to a layout with field "FileName" on. Go to Layout [ LayoutName ] Paste [ Table::Filename ] [ Select; No style ] # # Set the Variable to the whole filepath. Set Variable [ $FilePath; Value:Get ( DesktopPath ) & "Test/" & Table::FileName & ".txt" ] # Import using the varaible. Import Records [ Source: “$FilePath” ] [ No dialog ] I hope this helps Orlando Edited November 14, 200619 yr by Guest
November 14, 200619 yr Author Ok Tx I resolved the problem: The variablename needs to be $$FileToOpen and as value I used Get ( ActiveFieldContents ) & ".txt" Tx for your help
Create an account or sign in to comment