Jump to content

Steven Cappiello

Members
  • Posts

    418
  • Joined

  • Last visited

Everything posted by Steven Cappiello

  1. Topic: NY FileMaker Pro Developers' Group Time: Mar 19, 2020 05:30 PM Eastern Time (US and Canada) Join Zoom Meeting: https://meetmsk.zoom.us/j/515666745
  2. @kiva I forget what the problem was but we tried (hard) to get it working with the BaseElements plugin and there was something it couldn't do, at the time. And we ended up getting it working with MonkeyBread. I'm attaching the working script again.. it may include a few lines that we added in for good measure. The "MBS" function name is missing because we haven't yet purchased it and were using a demo at the time. We're waiting for the next version of FMServer to purchase the plugin. I found the following which looks useful if you want to give BaseElements a try first: http://support.goya.com.au/discussions/free-baseelements-plugin/1463-http-post-with-token-json
  3. I suspect I’m forgetting something simple. I have a relationship and I’m successfully showing the correct related records in a portal. On that same layout from the context of that main table (not a TO of it), a calculation is failing with ValueListItems ( Get(FileName); “valuelist_name”) It’s coming up blank. The value list however, is working. It is being evaluated from the context of the main table. When I put a field on that layout and assign the value list to a drop down field, I see the values. How on earth would this ValueListItems function be failing. Other calcs in this solution (albeit in a different table) with ValueListItems ( Get(FileName); “valuelist_name”) are working so it’s not a problem with Get(filename) or the file as far as I can tell. The selected field in the related value list is indexed, and the calc trying to use ValuelistItems () is unstored. Any thoughts about what I might be doing wrong? The relationship is a self-join to a TO of the same table, from a stored calc in the main table resulting in a text field (the word "yes"), to another text field in the TO which is an indexed text field in which some records contain the word "yes." Like I said the drop down list is working.. Any idea why ValueListItems( ) is not Many thanks in advance.
  4. With the help of Ronnie Rios, the folks at BaseElements and especially, Christian from MonkeyBreadSoftware.de and his Monkey Bread plugin, we got this working, with the following script: # start a new transfer Set Variable [ $curl ; Value: MBS("CURL.New" ) ] # set URL Set Variable [ $r ; Value: MBS("CURL.SetOptionURL"; $curl; "http://server34343.mskcc.org/rest/session/token") ] # set post Set Variable [ $result ; Value: MBS("CURL.SetOptionPost"; $curl; 1) ] Set Variable [ $result ; Value: MBS("CURL.SetOptionUsername"; $curl; "res_user") ] Set Variable [ $result ; Value: MBS("CURL.SetOptionPassword"; $curl; “password") ] Set Variable [ $result ; Value: MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-type: application/hal+json"; "X-CSRF-Token: $"&$r) ] Set Variable [ $result ; Value: MBS("CURL.SetOptionURL"; $curl; "http://dev.mskcc.org/entity/node?_format=hal_json") ] Set Variable [ $result ; Value: MBS("CURL.SetOptionPostFields"; $curl; "{\"_links\":{\"type\":{\"href\":\"http://dev.mskcc.org/rest/type/node/event\"}}, \"field_event_type\":[{\"value\":\"Seminar\"}],\"title\":[{\"value\":\"MBS TEST 4 after talking to Christian\"}], \"field_shared_datetime\":[{\"value\":\"2016-06-13T17:15:00\"}], \"type\":[{\"target_id\":\"event\"}]}"; "UTF-8") # run transfer Set Variable [ $ErrorCode ; Value: MBS("CURL.Perform";$curl) ] # get result as text and debug messages: Set Variable [ $TextResult ; Value: MBS("CURL.GetResultAsText";$curl) ] Set Variable [ $DebugMessages ; Value: MBS("CURL.GetDebugAsText";$curl) ] # cleanup Set Variable [ $r ; Value: MBS("CURL.Cleanup"; $curl) ] Set Variable [ $result ; Value: MBS("CURL.Cleanup"; $curl) ]
  5. This is awesome.. I am going to watch the video now (& probably rewind several times, lol) to see if it sheds any light on an issue I'm having with regard to this post: http://fmforums.com/topic/100167-trouble-posting-to-drupal-via-restcurl-baseelements-plugin/ Thanks for all you do for the FileMaker community Matt!!
  6. Hi everyone, I'm trying to post data to a Drupal application from FileMaker via the BaseElements plugin. I'm getting a token, setting authentication, headers, and the post variables via the BaseElements functions and I've followed examples but I'm getting the following error: {"error":"The type link relation must be specified.”} I can't find any information about what this error might be. Does anyone have any idea based on the output I've gathered below? A working cURL command that I'm basically trying to replicate that can be run from the command line is here: curl --include \ --request POST \ --user res_user:"password" \ --header 'Content-type: application/hal+json' \ --header "X-CSRF-Token: $X_CSRF_TOKEN" \ --data-binary '{"_links":{"type":{"href":"http://server.mskcc.org/rest/type/node/event"}}, "field_event_type":[{"value":"Seminar"}], "title":[{"value":”Novel Approaches to Mating Drosophila"}], "field_shared_datetime":[{"value":"2016-06-13T17:15:00"}], "body":[{"value":"Tea ?: Yes<br>Tea Time: Tea at 1:15 PM"}], "field_shared_location_text":[{"value":"ZRC Auditorium"}], "field_shared_sponsor":[{"value":"Developmental Biology"}], "field_event_hosts_text":[{"value":"Alexander Rudensky"}], "field_shared_people_text":[{"value":"Name of Speaker: Steven Reiner<br>Speaker\u0027s Credentials: M.D.<br>Speaker\u0027s Title: Professor, Department of Microbiology and Immunology<br>Speaker\u0027s Affiliation: Columbia University Medical Center<br>Institution Location: New York, NY"}], "type":[{"target_id":"event"}]}' \ http://dev.mskcc.org/entity/node?_format=hal_json I've attached the script I'm working with as an image. thanks in advance. Steven ----- BE_Curl_Trace returned: == Info: Trying 172.22.233.50... == Info: Connected to dev.mskcc.org (172.22.233.50) port 80 (#0) == Info: Server auth using Basic with user 'res_user' => Send header, 0x12c bytes (0x12c) 0000: POST /entity/node?_format=hal_json HTTP/1.1 0x2d: Host: server.mskcc.org 0x42: Authorization: Basic cmVzX2RydXBhbDpUcnU3SCZrQQ== 0x75: User-Agent: libcurl-agent-base-elements-plugin/3.2 0xa9: Accept: */* 0xb6: Content-Type: application/hal+json 0xda: X-CSRF-Token: q3LKwzWvNtlP2_X79TpJATfEnOB8HV-_lDaVCiTK8gg 0x115: Content-Length: 353 0x12a: => Send data, 0x161 bytes (0x161) 0000: " {\"_links\":{\"type\":{\"href\":\"http://dev.mskcc.org/rest/ty 0x40: pe/node/event\"}},.. \"field_event_type\":[{\"value\":\"Seminar 0x80: \"}],.. \"title\":[{\"value\":\"Sister Cells that Feast and Fas 0xc0: t --- Why Growth and Repair May Not be Fair XI\"}],.. \"field_s 0x100: hared_datetime\":[{\"value\":\"2016-06-13T17:15:00\"}],.. \"typ 0x140: e\":[{\"target_id\":\"event\"}]}" == Info: upload completely sent off: 353 out of 353 bytes <= Recv header, 0x1a bytes (0x1a) 0000: HTTP/1.1 400 Bad Request <= Recv header, 0xf bytes (0xf) 0000: Server: nginx <= Recv header, 0x24 bytes (0x24) 0000: Content-Type: application/hal+json <= Recv header, 0x1c bytes (0x1c) 0000: Transfer-Encoding: chunked <= Recv header, 0x18 bytes (0x18) 0000: Connection: keep-alive <= Recv header, 0x18 bytes (0x18) 0000: Keep-Alive: timeout=10 <= Recv header, 0x33 bytes (0x33) 0000: Cache-Control: must-revalidate, no-cache, private <= Recv header, 0x1a bytes (0x1a) 0000: X-UA-Compatible: IE=edge <= Recv header, 0x16 bytes (0x16) 0000: Content-language: en <= Recv header, 0x21 bytes (0x21) 0000: X-Content-Type-Options: nosniff <= Recv header, 0x1d bytes (0x1d) 0000: X-Frame-Options: SAMEORIGIN <= Recv header, 0x28 bytes (0x28) 0000: Expires: Sun, 19 Nov 1978 05:00:00 GMT <= Recv header, 0x25 bytes (0x25) 0000: Date: Wed, 03 Aug 2016 11:02:45 GMT <= Recv header, 0x2 bytes (0x2) 0000: <= Recv data, 0x40 bytes (0x40) 0000: 35 00x4: {"error":"The type link relation must be specified.”} <——— here's the error 0x3b: 0 0x3e: == Info: Closing connection 0 BE_Response_Headers returned: HTTP/1.1 400 Bad Request Server: nginx Content-Type: application/hal+json Transfer-Encoding: chunked Connection: keep-alive Keep-Alive: timeout=10 Cache-Control: must-revalidate, no-cache, private X-UA-Compatible: IE=edge Content-language: en X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Expires: Sun, 19 Nov 1978 05:00:00 GMT Date: Wed, 03 Aug 2016 11:02:45 GMT
  7. Any idea why the web viewer in the file you provided will not work via WebDirect under FileMaker Server 14? It displays a white box.
  8. Thanks a lot. I was scratching my head with regard to why Matt had all that code living in text objects on the layout. This approach certainly seems more straightforward. Now to see if I can get this working with some of the cooler charting scripts at d3js.org thanks again.
  9. I attempted to integrate the d3.js library into a FileMaker web viewer to display FileMaker data and am coming up with a mostly blank screen. I was following the very cool tutorial by Matt Petrowsky from here: http://www.filemakermagazine.com/videos/beautiful-interactive-custom-charts Anyone able to take a peek and tell me where I went wrong? thanks d3js_attempt.fmp12
  10. Basically, I'm trying to determine why FileMaker is suggesting the following requirements for RAM based on concurrent users, and I'm trying to see what will happen when we have far more users than recommended. (the server I want to test only has 4Gb of RAM so I'm concerned there will be issues when there are spikes in WebDirect activity)
  11. My server administrator has denied my request for more than 4Gb of RAM on a machine that is serving as machine #2 in a 2 machine deployment of FileMaker Server 13. I anticipate we will need more than 4Gb of RAM based off of FileMaker Inc.'s recommended (and minimum) RAM amounts. The server admin would like to see a test conducted so that I can basically prove this machine needs more resources. (yes, I know, I'm not sure why the FileMaker, Inc. minimum specs should not be sufficient justification!) Could someone recommend a good way to stress test the WebDirect engine by simulating multiple connections? Would it be possible/advisable to run some sort of looping script and open multiple sessions in multiple tabs from a single workstation or a handful of workstations? Would I / Should I create multiple accounts so that they're not all sessions of the same user (admin).? Any other advice anyone has would be appreciated. The server is running Windows Server 2012, by the way.
  12. My company has just installed FileMaker Server 13 on a Windows 2012 machine. We've setup a few ODBC DSN sources and I've confirmed they work because I've accessed a few of them via remote clients using ESS in a few of the databases that are hosted on this server. One of the DSN sources is a DB2 source, so ESS will not work. So I was hoping to setup a PSOS that would import from ODBC. So, I was thinking I could run FileMaker Pro client on the server machine, open up the database in question, and then write a script that performs the "Import from ODBC" with the configuration that would work for the context of server. Unfortunately, when I choose "Import / From ODBC" I do not see any ODBC sources available on the machine. So, I have two questions: 1. Does anyone know why this may be.... Am I missing something? 2. Is my approach/reasoning correct in thinking that if I can script the "Import from ODBC" while on server, I can have the settings saved in the script restored when I execute the import script that is performed on server?? My alternative for importing this DB2 ODBC data is to use a robot machine, but I'd really rather not do that. Thanks in advance for any insight on this.
  13. I need a little help... a cancer research colleague who is new to FileMaker needs some advice. Could recommend the best approach to tackle this? I'm a bit stumped/stuck. -- We need to calculate time between hospitalizations, let's call that H. For instance: Patient “1” was first hospitalized from 1/10/13 till 3/1/13 then hospitalized from 2/5/14 till 3/1/14 Patient “2” - from 3/2/13 to 3/8/13; 6/3/13 to 7/1/13; 9/1/14 to 9/15/14 Patient “3” - only 4/2/14 to 4/10/14 each patient will have different number hospitalization occurrences but in the range 1-10 We need to calculate mean time between hospitalizations and the standard deviation for patients with 2 or more hospitalizations. Any help anyone could provide would be much appreciated and would be put to very very good use! Thanks in advance. ---
  14. Thanks so much for taking the time to put together that demo file. Unfortunately, connecting the lines is kind of important in this case. I'd also like the graph to be dynamic in terms of new lines are added if there are more patient records, without having to manually add them to the graph. Anyone know of a way?
  15. Hi, I have a data set that looks something like the following in a subsummary layout. In each subsummary I can generate a line graph of time vs. value for each patient I am sorted by. What I would like though, is a stacked line graph, taking each of the lines from each of the sub summary sections, and stacking them on top of each other in one graph, with each line representing a patient. Is this possible?? I'm not sure how to proceed. Could someone please point me in the right direction? thanks much in advance. patient 1 sample 1 time = 1 second value = 10 sample 2 time = 2.1 seconds value = 21 sample 3 time = 3 seconds value = 31 sample 4 time = 4 seconds value = 43 patient 2 sample 1 time = 1 second value = 10 sample 2 time = 2.1 seconds value = 20 sample 3 time = 3 seconds value = 35 patient 2 sample 1 time = 1 second value = 10 sample 2 time = 2 seconds value = 20 sample 3 time = 3 seconds value = 35 sample 4 time = 4 seconds value = 44 Steven James
  16. There's a pretty good explanation of that (with regard to FileMaker Server 12) here. Quite a bit of the way down the page. Under 12, it seems if you choose "open storage," the server will keep only one copy of an identical file, but if you choose "secure storage," multiple copies will be kept in a server-generated file directory structure. Anyone have any idea if this has changed in 13 ??
  17. Thanks much.. I was thinking ExecuteSQL would be a good approach. i was hoping to avoid filtering the relationship.
  18. In the attached file, given this current data model, I would like to know the best way to calculate the following two results: From the context of "experiment" 1. the amount of the most recent sample of type "BA-A" for each experiment 2. the amount of the most recent sample of any type starting with "BS" for each experiment Additionally, I realize there may be a better way to model this data.. any suggestions on that front? (note: I am helping a beginner with this and he may not be inclined to change his data model, so being able to calculate 1 & 2 above would be a big help.. but, if I could give him suggestions regarding modeling what he's trying to do better, I'm all ears. I have my thoughts, but I'd appreciate hearing from you, too) Many thanks in advance. tissue_samples.fmp12.zip
  19. I am trying to send clickable links which trigger a script in FileMaker databases via email to PC Outlook users via plain text emails (generated by a FileMaker database).  The users are on locked-down workstations in a hospital environment and can not add file protocol associations to Outlook's settings. Since this configuration of Outlook *does* convert URLs that start with "http" into clickable links, I was thinking that I could get around the Outlook limitation by sending an http: link that looks something the URL in the attachment  (i had trouble inserting the URL via <code> into this post (it kept coming up blank), so, I've attached an image of it. With the code of "t.php" being: <?php $url=$_GET['var']; ?> <html>    <head>        <title>One second please... </title>        <meta http-equiv="refresh" content="10;URL='<?php echo $url; ?>'" />    </head>    <body>        <p><a href="<?php echo $url; ?>">Redirecting to <?php echo $url; ?></a></p>    </body> </html>  however, the FileMaker script parameter (&param=abc123) is getting dropped. Do you know how I might be able to redirect to the entire URL with the parameter in tact??? I'm not married to PHP to pull this off..  any thoughts?  Many thanks in advance. Â
  20. I would like for one of my databases to track the user's active or inactive status in FileMaker. My thought is that the tracking file needs to have a script which has a variable that gets updated with a "last action" timestamp sent from any of the open files, and an onTimer script that compares the current timestamp with the "last action" timestamp. When the difference in time exceeds a certain amount of time, the status is changed to "away", and when the user returns, the status is changed back to "online." I'm thinking that the simplest way to do this would be to have a script called "log activity" in the tracking file, one that any file that is open could call.. I'd have to attach the script call to all major script activities in all files. The onTimer script in the tracking file will look for a difference between "last activity" and "current timestamp", and if it exceeds a certain amount, the status is changed to "away", and when a new activity updates the "last activity"... the status will be changed back to "online." Am I right in my thinking here? Is this a good approach?? I don't think any parameters are even needed unless I wanted to do logging.. agree? thanks
  21. Thank you all.. the Levenshtein calculation on Brian Dunning's page seems to be something along what I had in mind.. LOL.. I would have never searched for "Levenshtein" Thanks for all the useful feedback.. I will see what I can come up with and may post it back here for review.
×
×
  • Create New...

Important Information

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