Jump to content

Greg Hains

  • Content Count

  • Joined

  • Last visited

  • Days Won


Greg Hains last won the day on June 21 2018

Greg Hains had the most liked content!

Community Reputation

3 Neutral

About Greg Hains

  • Rank
  • Birthday 12/26/1967

Profile Information

  • Gender
  • Location
    Brisbane, Australia

Contact Methods

  • Website URL
  • Skype

FileMaker Experience

  • Skill Level
  • FM Application

Platform Environment

  • OS Platform
  • OS Version
    High Sierra

FileMaker Partner

  • Certification
    Not Certified

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Comment. Thank you very much for putting this together and sending it to me. I will use this method over the ExecuteSQL now. Greg
  2. Hi Comment, Thank you for your reply. I can use the relationship to get the figures, but I found that in an earlier project the ExecuteSQLs were running incredibly quickly, and as I had many thousands to do, I thought would start with that method. Sadly, I cannot get the example you sent through to work - I know it was untested and that's OK - but I will persevere to see if I can assemble enough examples that it will play ball for me. Cheers, Greg
  3. Good morning. Despite there being numerous examples out there (the following being just one of-), for the life of me I am unable to get a specific calculation to work. https://fmforums.com/topic/93770-sum-function-with-execute-sql/ Here's a simplified version of my query: I have a table called DL_AT. In this table I have three fields Date: (date), Service (text), Amount (number). I have a second table called Invoices In this table I have three fields: Date (date), Service (text), Total (number) The relationship between the two tables is DL_AT::Date = Invoices::Date AND DL_AT::Service = Invoices::Service I have a portal setup within Invoices, and as log as Date and Service is set, I can view the corresponding records in DL_AT within the portal. Easy. The problem I am experiencing is doing a sum of the values in Amount in DL_AT (of the related records) using ExecuteSQL SUM. In the portal I can see the values of DL_AT::Amount that I wish to add up, but I think there is something very wrong with the syntax of my statement. I think it is table and field names within the SQL statement, and also perhaps the way I use the date variable. I have used ExecuteSQL successfully a number of times before, but not parsing date variables. The version below is one of many different attempts to get the syntax right. When the script is saved with no errors, I still just get a question mark or blank as a result. (I know I have mixed use of reference to tables and fields here (quotes and not quotes) but this is the core of what I'm trying to do. I get an error sometimes saying "List Usage is not allowed in this calculation" and it's to do with the closed double quotes before the first parsed variable. Let ( [ ~svctype = Invoices::Service ; ~svcdate = Invoices::Date ; ~sql = " SELECT SUM ( "DL_AT | Amount" ) FROM DL_AT WHERE "DL_AT | Service" = ? AND "DL_AT | Date" = ? " ; ~total = ExecuteSQL ( ~sql ; "" ; "" ; ~svctype ; ~svcdate ) ] ; ~total ) Could somebody please show me where I am going wrong? Cheers, Greg
  4. Hi Comment, Thankyou, and I did not mean to scoff at your advice. I know that such changes would be difficult to manage in a multi-user environment. I really know that a lot COULD go wrong doing this, however, the solution you put forward will work for my purposes. Cheers. Greg
  5. Hi Comment. Thank you again. At first I was just going to change the order_num value of the current record (being moved) to less then that of the number below it - but swapping it would be cleaner, so I will do that. it is multi-user environment so I will have to test it thoroughly to see how it goes. 'What could possibly go wrong?!" Cheers, Greg
  6. Hi. (If somebody feels this question needs to be moved to another section, please advise - I couldn't make it "fit" anywhere else) I have a table with several items in it. One of the fields is "order_num" (a number), the other field is text. What I am looking to do is be able to reorder that list based on the number - which can change. But wait for it... I want to be able to reorder that list with either a increment and decrement button, where clicking them would either increase the order_num number or decrease its position in the list. A script trigger could then re-sort that list based on the new numbers in that list. What I am not sure how to do is increment or decrement the number but not make it the same as any other number. For example: If I have three records where the numbers (in order are "1", "2" and "3"). If I wanted to move the second record to the top of the (ordered) list by making it "1", it would then have the same value as the first record (1,1,3). I would like to do something like decrement every number below it so that there were only unique numbers and the list could be re-sorted. This seems clumsy to me, so figure there must be a more elegant solution. Ideally, I was hoping to have it so I could either use the increment [in list] or decrement in list, or be able to drag the items to a new location in the list - like "between" others. I've sort of had this working with container fields, but never in list re-ordering. Has anybody got any ideas how I could achieve this please? Any suggestions welcome. Many thanks in advance. Greg
  7. Hi Wim. Thanks for getting back to me. I'm happy to do the long way but thought there may have been a more efficient way. Out of curiosity I might look up the CLI method. It's not as if I will be making a habit of this. In response to your "why?", I developed a product that a company want's to take under their wing and they already have a naming convention for their other products so I'm bringing the name of this one into line. It started off as a fairly generic name whilst it was being developed. Cheers, and thank you again for your help. Greg
  8. Good afternoon, I realise this may not be the correct location for this posting, but it seemed the most appropriate. If it has to be moved, please do so. I have developed a solution that is hosted in FM Cloud (through AWS) and I have need to rename it. As far as I can tell, I have to download it, remove it from the host, rename it, then upload it again. Is this correct or is there a simpler way please? Greg
  9. Hi Comment, The inability to scale GIFs would not bother me - they would all be fixed size anyway. Thanks for the info re HTML5 canvas animation. I'll look into this further as opposed to SVGs. Greg
  10. Hi Comment, To my rescue again. 🙂 Thank you for that link on SVG grammar. From what I can determine, SMIL is an abbreviation that has appeared often in my searches - when I was looking into using the animated SVG files. I have no preference of animation type to be quite honest, although I understood using animated GIFs within web viewers to be an antiquated method - I'm happy to be corrected. Sometime back I was playing with Base64 in container fields, but I don't see much current mention of this. There were other forums that talked about saving animated GIF files in a container field and displaying it - but I had limited success with this - https://hbase.net/2010/11/09/filemaker-progress-indicators-using-a-web-viewer-and-animated gifs/ The animations I am looking to employ - say from Elementals - would be the ones associated with "Please Wait" - such as the spinning ones. Script runs, animation appears, script completes and animation is hidden again. I have no preference as to how the file is employed, but with huge library of animated SVG icons available it would be nice to utilise them where I can. Thank you again. Greg
  11. Hello, An SVG newbie here. I would like to use animated SVG icons, but I am having trouble using them. From what I can tell, they can only be imported onto a button - not directly on a layout - and whilst it displays on the button, it does not animate. On that point, is it possible to place it on a layout through the likes of a web viewer perhaps? I'm on a Mac (OS is High Sierra 10.13.6) running FMPA 18.0.3 and wondering if this platform may be the issue. I've seen mention about IE and Edge being a problem, but not Mac. I've not found anything through Google on how these are used in Filemaker. Can I get a hand please? Greg
  12. Hi Iain, Looks like you got cutoff, but yes, the Insert File worked whereas Insert PDF did not. It's all happy now. Thank you to everybody who helped me. Greg
  13. Hi Comment, I never had a problem creating the PDF or where it went - that was all fine - yep, I use the correct file path. Target field was the active layout object too. What was not working was the actual Insert PDF command. Debugging gave me a File Missing (100) error on that step whether I used variables or fixed locations. I tried many combinations. I tried an Insert File instead and it worked fine first time. Thanks for that idea. I'm not sure why Insert PDF is not working, and I will follow this up later. Thank you for helping me get it working. Greg
  14. Hi there, Thanks for getting back to me. Getting the PDF file to save to a disk location hasn't been a problem ($fpath), but inserting it into a container field is eluding me. Unless I'm doing something wrong, the Insert PDF command only allows a string to be entered - file path etc - not a [container] field to copy/move it to. What am I missing please? Greg
  15. Good morning. I have a solution that generates a PDF from a series of tables, appending various pages to the report. Sending it via email is fine, even saving it to a fixed file location, but I am experiencing difficulty in being able to save it in a container field so the user should be able to click on it and view this PDF on the screen. How do I save this please? I don't get an error in the solution (or script debugger), it just doesn't appear in the field. Any suggestions please? Many thanks in advance too. Greg
  • Create New...

Important Information

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