We have reset all users FileMaker related profile fields. Please take the opportunity to update your information,  this will provide background to members whom read your posts. Click here.

Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Toni

  • Rank
  • Birthday 04/27/1974

Profile Information

  • Gender
  • Location
  • Interests
  1. Well, I am not gonna revisit this script again in a long time and probably will forget the logic behind it . Having a field which will show the result of the calculation will help me remind about it.
  2. I think I am getting there. For the calculation of folder name, I used the formula suggested by @comment. Great tip Then searching and testing, after some time of both, managed to come with a script with send event in it which creates the folder from there. Script steps: set variable [$path; value:"D:\Docss\FileMaker\GestProduzione1\\"] # here "Table" is the table of FM and "Make_Folder_prev_month" is the name of the calculated field send event ["aevt"; "odoc"; "cmd.exe /C MKDIR " & Quote($path&Table::Make_Folder_prev_month)] One thing which I don't understand (and I hate it) is why I need to add a backslash at the end of the value of $path variable. Is the extra backslash to indicate end of the string? Shouldn't be enough a quotation mark? Thank you both for great input. Very happy with it.
  3. Thank you both, great contribution I chose to export it into a cmd or bat file because obviously I am not that good to figure it out by the send event :). I will try some more and let you know, it's late around here and will try it tomorrow
  4. Thanks Wim for your reply I tried it and it won't create the folder. See, this character is somehow inserted in the file. I can not see it when I open it with notepad, but when i try to execute it within cmd window it shows up. Even if try to execute the date.cmd file by double clicking it won't create the folder. Funny thing is that if I manually copy the content of the field from FM and paste it in the cmd window it will execute normally. This character is inserted during the export. I have defined the field, in the language option as unicode.
  5. Hello I am trying to automatically create subfolders in Windows which should be named year_month, like 2016_11, 2016_12 and so on. This will be done once the month has passed, probably around 10 to 15 of next month. For example, on the 15 of November 2016 a folder named 2016_10 has to be created. I have managed to create a calculated field which content is exactly what I need. Below is the calculated field: "md"&" "&( If ( Middle( Get ( CurrentDate );4;2)="01" ; (Middle ( Get ( CurrentDate );7;4)-1)&"_"&"12" ; Middle ( Get ( CurrentDate );7;4)&"_"&Right(0&(Middle( Get ( CurrentDate );4;2)-1);2))) Then, a script, exports this field content into a file "date.cmd" in the folder I need to and is set to automatically open it. So, what I expect is command line file which simply has as content "md 2016_10" and when executed it should create the folder. Thing is, it doesn't. When I open cmd and execute from there the created file, I see that there is a black square character preceding "md", thus cmd responds with " '■m' is not recognized as an internal or external command". I suppose that is some character added in export, during translation from field content of FM to the text file of windows. Any idea how to solve this?
  6. Import XML how to

    Thank you @comment for the sample. I will play a little bit and come back with some results if I can
  7. Import XML how to

    I didn't wanted to bother you guys with an attachment. It wood look like I am looking for you to do my work Since you asked, I am going to attach it. I deleted a great part of the file, because it is really big. If you open it in Excel you would have a better understanding of what the fields are. Thank you all for your replies. As I understand, first I need to learn the XSLT language, but I should understand the FMPXRESULT as well, right? To have a better idea, the XSLT is a file whihc tells FileMaker where to pick the fields from the XML, or it does transform the XML into another XML understandable for FileMaker? Is one XSLT file enough for many XML files, or would I need an XSLT for each of the XML files? 2015-01-11_Arbane1.zip
  8. Excuse for the rookie question, but I can't figure out how to import an XML file. I understand that it needs a xsl stylesheet. But how can it be built? Funny thing is that Excel can import the file, it detects that it does not have a scheme for it, but creates it on the fly. From excel I can import the data, but I don't like to go that route. So how can one built a xsl style sheet for filemaker? The xml file I want to import is in fact a tcx file of bicycle rides, and they are xml actually. Any help? I understand the question is a bit general, but any pointing to the right direction would be helpful.
  9. Yes comment, you are right, it worked. I did forgot to put filewin: at the begging of the calculation. what I finally did was: "filewin:/D:/Desktop/m"&Right (ComNuovo::Data Fattura;2)&ComNuovo::Fatt nr&"."&"txt" ComNuovo is the database, Data Fattura and Fatt nr are the two fields of the database which I use to name the file. Best regards, Toni
  10. Well it didn't, but now that I am thinking I didn't put "filewin:" in the variable calculation which probably caused the problem. I will try once more tomorrow. Thank you again.
  11. Thanks for pointing that option. I haven't seen that. It took a while to figure it out, but finally got it working. At first I thought that I should have specified the whole path and filename within the variable. But it wasn't working that way. So I defined only filename on the variable, and the path in the export step of the script.
  12. Hello Is it possible to automatically name the output file based on the value of a field? Let's say I have text field with value 4512 (which is a code) and I want to export a tab-sparated file with name m124512, where m indicates the department, 12 indicates the year, and 4512 is the value of the field. Thank you, Toni
  13. Hello I have two related tables in the same file. In table Product I have a field A and in table Feature I have a field A1. The Field A contains a code of the product and thanks to the relation it gets its features from the table Feature. There could be from hundred to thousands records in the table Product which does have the same value in the field A. But in the Table Feature there is only one record with the value in A1, and it is restricted to have a unique value by definition. My question is, is it possible to create a new record in the Table Feature, when in the table Product is imported a record with new value in field A which does not exist in table Product as well? Thank you, Toni
  14. Scheduled Script

    Thank you guys for answering, and forgive me for not providing feedback. Looks like my email alert for my topic isn't working. No, I don't have FileMaker Server. What can be done through server version? does it have included an option to run scripts at scheduled time? I will try the other workarounds suggested here. Look like they will do it.
  15. Scheduled Script

    Is there a way to run a script at scheduled time? I don't want it to run at open or close file, i want to be executed at scheduled time. Using FileMaker 11 on Windows 7 Thank you, Toni