Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Jalz

  1. Hi, I have about 10 text files id like to put in a folder locally on a computer and then parse through the data for each file and create relevant records in various tables in my solution Before I create a temporary table that houses the imported records, I was wondering if I could reduce the schema by getting the webviewer to display the contents of the text files, which I could then scrape and generate the records. Has anyone opened up a text file in a web viewer? Thanks
  2. Hey Guys, i've got a filemaker script which uses the execute sql command a couple of time to retrieve data which is contextless. i now need to port/convert that FileMaker script So it works with PHP API. When i've worked with the API in the past there was no command equivalent to execute sql, is it still the case - or is there a work around to this. Worse case scenario is for me to create a FileMaker script and get the api to perform script and store the result in php variable. However really wanted to keep php scripts isolated from my FM scripts. Thanks in advance
  3. Hey Guys I've wrote this function but just can't get it to work. The plan is to inject some content (template) and for it to iterate through each word looking for a formula, i.e. {{If([[CarMake]] = "Volvo"; "Volvo" ; "Other" )}} and evaluate it. I think the calculation I have is working fine, but I can't quite manage to work out how to loop through each word in the content. I've tried to reverse engineer Ray Cologens Mail Merge formula as that custom function kind of did what I needed, but I didn't need all of it. Thanks in advance. MergeText(Template) Let([ start_pos = Position(Template; "{{"; 1; 1); end_pos = Position(Template; "}}"; start_pos; 1); formula = Middle(Template; start_pos + 2; end_pos - start_pos - 2); formula_VARS = Substitute(formula ; ["[[CarMake]]";"$CarMake"]; ["[[CarModel]]";"$CarModel"]; ["[[CarType]]";"$CarType"] ); original_formula = "{{" & formula & "}}"; evaluated_formula = If(EvaluationError(Evaluate(formula_VARS)); "Invalid Formula"; Evaluate(formula_VARS)) ] ; Case( Right(Template ; 1 ) <> ¶ ; MergeText(Template & ¶) ; start_pos > 0 and end_pos > start_pos ; MergeText(Substitute (Template ; original_formula ; evaluated_formula ) ) ; Template ) )
  4. Figured it out, array_merge() is the command thats required
  5. Hey Guys, I've got two sets of results from two different queries. The fields in both tables are almost identical, the one field I need to access is. My question is before I continue to do the foreach loop to return the appropriate field, can I merge the two results together prior to my foreach loop? It would basically help condense some of the repetitive code. the only field I am interested in retrieving from both datasets is called dataPlot. $dataset1 = $fm->newFindAllCommand('table_dataset1'); $result1 = $dataset1->execute(); $dataset2 = $fm->newFindAllCommand('table_dataset2'); $result2 = $dataset2->execute(); Many thanks Jalz
  6. Yes, two different files. I don't want the user to access all the business logic if the interface file, hence the separation. Wasn't sure where to post this in the forums, but I think its a layout issue, as I'm hopping from one layout to another layout, in another file. I suspect I am going to have to loop through all the records in a found set copy the ids of the records and find them on the secondary file.
  7. Hi Guys, I have a customer file which is a just a table of data. I then subsequently have a interface file, with a reference to the customer file, however I have a locked layout where the user can find add etc data to the customer table. The interface file has scripts, values lists etc. and is pretty locked down. I have then created a reports/exports file which is totally unlocked. I have a reference to the customer table and only the customer table is showing in the database diagram. My question is, if the user is doing a 'complex' find in the interface file, and out of 12000 records they find 641 records. How do I pass that foundset to the reports file. I can't use the GTTR as there is not table occurrence in the reports file, really want to avoid looping through the records. Thanks Jalz
  8. Hi Guys, I've got a script which I need to replace multiple items. I can't use the substitute command as I need to be precise in what I am replacing, so I have a let function which determines the position and length of items and want to use the replace function. This all seems to work well, however I have come at a cross road where I need to replace 3 items in my $variable, so I have placed 3 replace functions in my script. The problem is my output is also tripling, just want to output 1 set of data. Let([ I declare all my variables which obtain the start and length... ]; Case( // If its the first one in the loop keep the start date but replace the enddate $j = 0 ; Replace ( $variable ; pos_endtime ; length_endtime ; "18:00:00" ) ; /* THIS IS WHERE I AM HAVING TROUBLE I WANT TO REPLACE 3 ITEMS in my $variable*/ // If its greater than the first day and meets the last day replace start date // Start Date needs to be incremented $j > 0 and $j = $day_count ; Replace ( $variable ; pos_endtime ; length_endtime ; $endtime ) & Replace ( $variable ; pos_starttime ; length_starttime ; "8:00:00" ) & Replace ( $variable ; pos_startdate ; length_startdate ; start_date_new ) ; $j <> 0 and $j <> $day_count ; Replace ( $variable ; pos_startdate ; length_startdate ; new_date ) and Replace ( $variable ; pos_starttime ; length_starttime ; "8:00:00" ) & Replace ( $variable ; pos_endtime ; length_endtime ; "18:00:00" ) ; ) ) Thanks in advance
  9. Hi Beverly, Tried that, unfortunately the Close Window command does not work, errors on execute. I can execute a normal set field script. I guess its because I'm trying to close the window down client side? Thanks Jalz
  10. Hi Guys, I've built an application and one of my 'dialog' windows has a web viewer in it which contains a html text editor. I use api for php to add content back into a FileMaker database when someone submits the html form. This all works well, however I would also like to shut down my FileMaker dialog window, upon submit. Is this possible using the API for PHP somehow calling a client-side script to close window for the particular user? Thanks in advance
  11. Thanks for the sample file DWData - I'll explore and see how I get on
  12. Hey Guys, Do any of you know if I can use the open url command (or any other FileMaker command) to open a webpage on its own as a pop up and not as a tab. Ideally I need to inject some javascript (which I have) wrapped around the web address. I've tried to inject javascript with the open URL script but I've had no luck. I have also tried to created a button in the web viewer and when the user clicks on that, I'm assuming it opens another tab in the web viewer, as thats where the scope of the button was. Of course I can't debug this as FileMaker WebViewer doesn't have any built in debug tools for javascript (Windows - I.E) I've got the javascript method figured out as I can do it via a html page, but anyone else found a way to create a button on a FileMaker layout which can open a web browser execute javascript. window.open("http://www.w3schools.com", "_blank", "toolbar=yes, scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400"); Thanks Jalz
  13. Hi Guys, I've wrote some javascript which works fine in internet explorer. When I run the script from my hosted server from the web viewer it fails. Does anyone know of any methods/ways I can use to capture whats happening in the console. The Mac version allows you to inspect the element and write to a log, however I'm really stuck with debugging the Windows version Thanks Jalz
  14. Jalz

    WYSIWYG editor

    Hi Josh, Thanks, something like this would be ideal, one file. Only problem is, its too simple. I need to add another dropdown list in the toolbar, with a predefined list of FileMaker fields - cant seem to do this with this editor. I know with TinyMCE you can, but that comes in multiple files....
  15. Jalz

    WYSIWYG editor

    Hey Guys, Has anyone implemented a html WYSIWYG editor in FileMaker using javascript files stored inside of filemaker and not hosted on a server. I've implemented TinyMCE into the web viewer, however I'm hosting the tinyMCE files onto a server and then posting data to a PHP page which returns it back into FileMaker. I find this a little slow performance wise and I would rather try and get the fmp URL and post data directly back to FileMaker. Would be interested to hear thoughts, ideally need an editor where I can pick the database fields from a drop down. Ive looked at JQTE editor and thats too basic to use as you can't initialise fields to pick from.
  16. Hi, I run a small in-house FileMaker development team and we are currently engaged in a large project with tight deadlines (11 months until delivery). One of my developers has unfortunately fallen ill, and could be off for a significant amount of time. While I await for his return I need to start planning a contingency and wanted to know if there were any contractors local to me that I could tap into until his return. We've got a design spec and a stylesheet and are developing modules using the separation model using FileMaker 14. All code must be documented and will belong to the company I work for. The person I'm looking for will be someone that can come to the office (so ideally already living near Leicester, Nottingham or Peterborough) and do a typical 9-5 in a busy office - sorry for those that were thinking of working remotely. Please message me with your daily rate and experience level if you are interested and more meet the criteria. I'd like to take a contingency plan to the the stakeholders who will ultimately make the final decision, i.e. delay the project or hire a developer to help out. Unfortunately this isn't a position for someone whose just starting out new in FileMaker. Please can you private message me via the forums. (Thanks Lee) Kind regards Jalz
  17. Hi All, The only way I could achieve removing the border was to put my url in a styled iframe which didn't have the border. Thanks Jalz
  18. Hi Guys, I know to get rid of the ugly webviewer border in Windows you have to use some css to remove it. I have found code samples which work, but only if you build the html up and display that html in the web viewer (hope I have phrased that OK) data:text/html;,<html><style>body { border:0; margin:0; ... What I can't figure out is how to remove the border if in your web viewer calculation engine, you only have a url you are pointing towards, such as https://someplace.com. Can someone post a snippet of code of how I can implement the css with a url please? Thanks Jalz
  19. Thanks John, Much appreciated - thanks for the info regarding parsing the data... Think I'm going to use a web viewer and html to do the letters.
  20. Hi Guys, I'm writing a mail merge facility for my database. I've found the excellent custom function by nightwing which will convert mail merge text into data from my records. One of the things I need to look into is the ability to format tabular data into one of my mail merges. Has anyone created a grid in a field that holds tabular data? I know using the formatting toolbar, you can use tabstops if I was manually typing in the data but can you apply tabstops through scriptmaker? Also wondered whether you can apply any 'borders' to the grid data. Thanks Jalz
  21. Hey Guys, I have a list of UUIDS all separated via a carriage return. I'm using a where IN clause in my execute SQL and understand that if I want to put my values in the IN then I need to remove the carriage returns and surround each value with a quote mark. Does anyone already have a standard way of doing this or a custom function already available they can point me towards. Thanks Jalz
  22. Thanks Wim for replying. I've got the webviewer to trigger a script using the form post. What I haven't managed to do is actually receive data from a field. I'm not too worried about the encoding as I know I can do that in FM - I just want to see if i can transfer the data from the "name" input field to a dialog I have in my FM Script. I've found various samples online and understand I have to use the 'param' in my url, am I right in thinking javascript is the only method to combine the post data, or can the 'native' form post be read directly in FileMaker? What I'm trying to say is, is there a command equivalent to $_REQUEST['name'];
  23. Hi Guys, I'm playing around and experimenting with FileMaker so I've got some time to learn new things at the moment. I've setup a form in the webviewer and the form has a submit button, which currently uses the post method to a php page which then populates my FileMaker database using the the FileMaker API for PHP. I've recently discovered from posts regarding the fmp url. I've done some searching, it looks like with this technique you can open files, trigger scripts etc in FileMaker outside or inside the application. I'm wondering whether I can somehow from my form in a webviewer, post (using the fmp url method) to a scriptmaker script and do all my manipulation in FileMaker therefore bypassing the php page? Would the fmpurl be suitable for something like this and could I invoke it simply putting in the path to the fmp url in the action attribute of the form tag? Thanks Jalz
  24. Hey Guys, Does anyone know if its possible to insert predefined tags in a web viewer. I've got a web viewer which allows the user to enter in content, however I also have a set of FileMaker buttons with certain keywords which I want the user to click on and the text on the button gets transferred to the web viewer, where ever the cursor was. Thanks as always Jalz
  • Create New...

Important Information

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