Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Savery

  • Rank
  1. Did you ever get this to work? Would be very interested to know how you got on, even if the experience was a bad one.
  2. Have you considered placing a send-single command within a loop which get the next email address from a list held in a variable?
  3. I've written a simple shell script command to join two files together using cat. From the command line I would write something like: cat fileA.txt >> fileB.txt My shell command, which compiles, is: RegisterGroovy( "AddToFile( addfrom ; addto )" ; "String[] cmd = ["cat", addfrom, ">>", addto];¶ Process process = Runtime.getRuntime().exec( cmd );¶ String processResult = process.getInputStream().getText();¶ process.waitFor();¶ exitValue = process.exitValue();¶ return processResult;" ) However, this merely returns the contents of each file and does not add
  4. This typo is in the bundled version Also, I cannot fathom why it won't support compressing a directory. Any ideas?
  5. The scripts are indeed being run as 'fmserver'. Now I just need to determine whether this user can scp. Could be that this is the problem. All other tasks are fmsadmin commands, bar one (which is independent of user).
  6. Right, so the 'scp' command in my shell script would need to be a fully-qualified path. I'll give that a try, although I should add that other commands before 'scp' all run fine without full-paths. The shell itself starts with the #!/bin/bash which I assumed, rightly or wrongly, would give the system enough to know where everything lived. One more thing that I've not been sure of: who is running the commands? Would it be logged-in user of the server, or fmserver user? I can't remember now whether I've allowed for either or both of these when modifying the sudoers list as I've been go
  7. I 'made' a new instance of the 'do shell' function so that I could pass parameters separately: RegisterGroovy( "ExecuteBackup( FMAdmin ; FMPass ; FMDatabase ; DGUser ; DGServer ; LocalVol )" ; "String[] cmd = ["./dg_backup.sh", FMAdmin, FMPass, FMDatabase, DGUser, DGServer, LocalVol ];¶ Process process = Runtime.getRuntime().exec( cmd );¶ String processResult = process.getInputStream().getText();¶ process.waitFor();¶ exitValue = process.exitValue();¶ return processResult;" ) Does this look like it could cause a problem? The shell script called uses double-quotes around all
  8. All I was getting back was 'ERROR', which, while true, wasn't particularly informative. : I have add the -v arg to my scp line in the shell script and will report back as soon as I can.
  9. I've written a little shell script which essentially takes a backup of a FM database (from passed arguments). The last step is to scp the ZIPd file back to our remote server. Testing the script from the command line works a treat. We get a lovely fresh copy of the database archived and sent to our remote server using scp. However, if I use 360Works SM to call this shell script with the same parameters it fails when attempting the scp command. Note: I am calling the FileMaker script, which uses SM to call the shell script, as a scheduled task in FileMaker Server Advanced 10. There is
  10. Thanks for this info. Interesting that even if this feature existed there'd still be problems using Fields IDs. Oh well, I'm still holding out hope for a solution or workaround which will help. Your link was interesting, but I couldn't see a way which it could be adapted to fit my current needs. Bookmarked it (remember those?*) for future reference. *I seem to use Digg etc more than bookmarks these days as I don't have a laptop and end up hopping from one computer to another.
  11. Why-o-why can't we yet specify the Import source and destination tables based upon a calculation/variable? I realise that mapping the fields would be a daunting task, so how about just 'Matching Field Names' or 'Last Order' as the options to choose from? Then, also give us the ability to do the reverse i.e. export our data with the same controls. Field mapping could be achieved with the FieldNames ( fileName ; layoutName ) and TableNames ( fileName ) functions to get an array of the field names and types for both destination and source tables. But this would be a laborious task to se
  12. I read your reply far too quickly, clearly. Thank you! I think Spent far too long on this before asking for help.
  13. Thanks for persevering with me. I have two fields with lists within them (simplified) Substitute_Tags: [##NAME##] [##EMAIL##] Substitute_FieldNames: Full_Name Email Full_Name: Steve Savery Email: somewhere@somedomain.org Ignore the first field for a moment. What I want to do is look at row n of Substitute_FieldNames and get the value of the name of the that field. So, in this example if I wanted row 1 of Substitute_FieldNames I'd get "Steve Savery" as the result. My loop encompassing all that I want to achieve would go something like this:
  14. Maybe the AllFields (start ) function will be a workaround. I could add the fields we're likely to need to a new layout and make sure people know to order the tag name in the correct order (using false tags where an non-required field falls).
  15. I was afraid I hadn't explained myself clearly enough... I can do the substitution (360Works comes with a BodySubstitution function which works fine). What I am trying, and failing, to do is use a text field to contain the names of the fields I'd like to reference as the 'replace with' values. So, say I have a text field called 'ReplaceWithValueFrom' which contains the value 'Customer_Number'. What I want to do is use a Substitution something like this: Substitute ( GetValue ( $tags ; $tag_row ) ; GetValue ( $replacefield ; $replace_row ) ) But I can't see any way of gettin
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.