Jump to content

DeathRobot

Members
  • Content count

    53
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DeathRobot

  • Rank
    member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,317 profile views
  1. Hello. I'm using a web viewer to control and stream mp3s from our server. This works great on my Apple laptop - the mp3 loads along with a player and I can listen to and control playback. It also works fine on one of two Apple desktop machines. But on one Apple desktop machine the file downloads to the desktop instead of loading in the web viewer. I've checked my browsers, both my default browser (Chrome) and the standard web browser (Safari), and the URLs play in the browser in both cases. Neither one downloads the track. Is there a way to control this behavior within FM so that the mp3 plays within the web viewer and doesn't download? Note: The URL for the mp3s are in the format "www.url.com/assets/mp3/filename.mp3". I am loading the web viewer by using the Set Web Viewer script step and just that URL; I am not adding any additional html formatting. The only checkboxes set for the web viewer are "Allow interaction…" and "Automatically encode…" Thanks.
  2. Help with API

    Thank you, Wim! That is working for me. Michael
  3. Help with API

    Hi. I am trying to script the getting of some data from a website that has an API. I have BaseElementsPlugin and was given an example bit of code by the website: data = {'domain': domain, 'include_generic': True} headers = {'X-Api-Key': 'xyz123'} resp = requests.post('https://api.anymailfinder.com/v3.0/search/domain.json', data=data, headers=headers) I have never dealt with this kind of programming and am not even sure where this info would go or what script step(s) I would use to call this. Is this CURL? Are you aware of sample FM scripting that I could use as a model to figure this out? Thanks for any help with this!
  4. And I see that Mr. Vodka credits you for coming up with this!
  5. Thanks, Fitch. First, #2: Yes, that's correct. I am using Mr. Vodka's technique. The SQL gathers the id's and sets a variable to that list, and the portal is set to sort on that global variable. #1: On all my other portals, I SELECT the id but ORDER BY another field. All of them work, and at the times they might not have (while experimenting with the calculations, for example), I never received an error; the records just failed to sort. On the above SQL statement, I always receive a "no records match your request" error, so the whole SQL statement seems to be problematic when including the ORDER BY. If I take it out, the search works; I just don't get any ordering. Michael
  6. Thanks for the reply. The SQL statement is to populate a portal. I use the "id" field because I know it's never empty, but I could use any non-empty field, I think. I do this same SQL select and ORDER BY on 6 other portals, but those are simpler select statements without UNION or LEFT JOIN. Those all work perfectly, so it really seems to be something to do with the addition of UNION and/or LEFT JOIN. Just to be sure, I did try your suggestion, but I still get an error. I've also tried adding parenthesis: SELECT People.id FROM ( SELECT People.id FROM People etc… ) & " ORDER BY People.nameLastFirstMiddleInitial ASC (I've also tried LOWER(People.nameLastFirstMiddleInitial ) ). " and adding an "a" (for alias): SELECT People.id FROM ( SELECT People.id FROM People etc… ) & " a ORDER BY People.nameLastFirstMiddleInitial ASC (I've also tried LOWER(People.nameLastFirstMiddleInitial ) ). " Those don't work either.
  7. Hi. I'm having trouble adding ORDER BY to an already working SQL statement. This statement works (the global variables are grabbed from two other looping scripts): SELECT People.id FROM People LEFT JOIN Companies ON People.id_Company = Companies.id WHERE " & $$peopleWHERE & " UNION SELECT id_People FROM DevPlayed LEFT JOIN DevInstruments ON DevPlayed.id_instruments = DevInstruments.id WHERE " & $$instrumentWHERE ; Adding the ORDER BY causes it to fail: SELECT People.id FROM People LEFT JOIN Companies ON People.id_Company = Companies.id WHERE " & $$peopleWHERE & " UNION SELECT id_People FROM DevPlayed LEFT JOIN DevInstruments ON DevPlayed.id_instruments = DevInstruments.id WHERE " & $$instrumentWHERE & " ORDER BY People.nameLastFirstMiddleInitial ASC (I've also tried LOWER(People.nameLastFirstMiddleInitial ) ). " ; Seems like this should work. Obviously, I'm overlooking something. Any idea what that is? Thanks, Michael
  8. Dynamic nested tables

    Thanks, Kris. That seems like it will work. However, this need to fit on an existing layout so I can't use list view…
  9. Dynamic nested tables

    I have the following tables: Projects --< Invoices --< Applied Payments >-- Payments On a Projects layout, I have a portal that show invoices, like so… 1. $500 INV2014333-001 2. $300 INV2014333-002 I would like to somehow create a list that nested payments from the Applied Payments table into that invoice list, like so… 1. $500 INV2014333-001 $250 received on 10/1/2014 (check #234) $250 received on 10/5/2014 (check #254) 2. $300 INV2014333-002 $300 received on 11/1/2014 (check #265) Ideally, the number of lines would be flexible so that if there were only one payment on the first invoice the second invoice would move up a line. Also ideally, clicking on any row would go to the related invoice or payment record. I assume there are ways to accomplish this (web viewer, SQL, dynamic value list?), but am not sure how best to start? Is this doable? Thanks, Michael
  10. One portal for two relationships

    Yes, you're correct. The calc was in the Projects table, not the ProjectsCreditsDebits table. Got it working now. Thank you!!
  11. One portal for two relationships

    Thanks very much, comment. I think I've almost got it, but still must have something wrong. I have three relationships: Projects --< ProjectsCredit >-- Projects Projects --< ProjectsDebit >-- Projects Projects --< ProjectsCreditDebit (using your List solution) (ProjectsCredit, ProjectsDebit, and ProjectsCreditDebit are the same table) On the Projects layout I have a portal to ProjectsDebitCredit. In the Projects table, I have a calculation that says: * * * * * Case ( id = Projects » ProjectCreditsDebits::id_ProjectsCredit; Projects » ProjectCreditsDebits::amount & " credit from #" & Projects » ProjectCredits » Projects::jobNumber & " (" & Projects » ProjectCredits » Projects::projectTitle & ")"; Projects » ProjectCreditsDebits::amount & " debit to #" & Projects » ProjectDebits » Projects::jobNumber & " (" & Projects » ProjectDebits » Projects::projectTitle & ")" ) * * * * * For a test, I created two records in the ProjectsCreditsDebits table; one which moves $500 from Project 1 to Project 2, and one which moves $250 from Project 2 to Project 1. When I'm on Project 1's record, I get two identical entries in the portal of: $500.00 credit from #002 (Project 2) $500.00 credit from #002 (Project 2) and when I'm on Project 2's record, I get two identical entries in the portal of: $500.00 debit to #001 (Project 1) $500.00 debit to #001 (Project 1) The $250 transaction doesn't appear on either record. What am I missing here?
  12. One portal for two relationships

    I have a table called Projects which has a dollar figure attached to it. I need to be able to debit an amount from one project and apply it as a credit to another project. I've created a relationship like so… Projects --< CreditsDebits > -- Projects where the CreditsDebits table has foreign id fields for "id_ProjectsCredit" and "id_ProjectsDebit" (both are the id field from Projects), as well as an "amount "field. I'd like to show credits and debits in a single portal on a Project layout. Is this possible? I know I can have two portals (one for credits and one for debits), but I'd really like to combine these if at all possible. Thanks! Michael
  13. Simple question about 2 page invoice layout(s)

    Thanks, Stephen!
  14. Simple question about 2 page invoice layout(s)

    Thank you both. Based on these last two comments, I think the one layout/portal solution is the way to go. Maybe the original question wasn't so simple after all… Michael
  15. Simple question about 2 page invoice layout(s)

    Hi Stephen, If I understand correctly, I think Tom's idea will work. I'd have… Title Header: first page header info Header: the entire second page, which contains a few fields and all the "small print" Body (list view): first page invoice line items Sub-summary: first page invoice total and notes that always come right beneath the last body item Title Footer: first page footer The header would fill an entire single page, and I suppose if I needed it to, could also extend to a third page. I don't have a lot of experience with printed layouts with lots of parts, so will have to try it out. If it doesn't, I'll probably go to your scripted two layout method. In that case, does the user's print setup choices remain valid for all layouts (e.g. if the script calls up a print dialog and the user wants to print 3 copies, does that choice remain active as the script goes to the various layouts and prints from each of them?
×

Important Information

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