Jump to content
  • Welcome To FMForums

    Welcome to our community, full of great ideas on developing your FileMaker solutions effectively,
     for peer-to-peer support of the FileMaker Platform and related products and services. Register and join the conversation!


    fmf AD.jpg



All Activity

This stream auto-updates     

  1. Past hour
  2. I have an ExecuteSQL question that I'm hoping you could help solve for me [FMP18A on MAC]. The best way for me to outline my question is to show the process I took to get to where I am currently. [Example data only] I have the following TABLE [Sales_Database] and COLUMN [FRUIT] setup, and my SQL calculation gives the following result: ------------------ ExecuteSQL ( "SELECT Fruit, COUNT(*) FROM Sales_Database GROUP by Fruit ORDER by 2 DESC " ; "" ; "") Apple, 77 Oranges, 67 Grapes, 57 Pears, 47 Bananas, 37 ------------------ I then broke it down further, wanting the results to only display the top most value (Apple). So, my SQL calculation and result was thus: ------------------ "SELECT Fruit, COUNT(*) FROM Sales_Database GROUP by Fruit ORDER by 2 DESC FETCH FIRST 1 ROWS ONLY " ; "" ; "") Apple, 77 ------------------ So far, so good. HOWEVER, for the purpose of using the result in a HIDE OBJECT WHEN calculation, I need the result to only show the word "Apple" no number attached. Removing the COUNT(*) just results in the calculation ordering the values by the length of their letters. I hope there's a solution to this problem, and thank you all in advance.
  3. Today
  4. Hi there, I am writing this post in order to request some assistance in creating a simple script which will allow me to find a number of records matching a certain criteria and then modify the date of those tasks. Brief - I have a simple database of which the primary function is to keep a record of jobs. A task list essentially. Each record has a number of fields included due date and status. Status are a pre defined list of string possibilities such as ''Open", "Complete", "In Progress". I have written a script which will find all records that have a due date of (today) and status of 'In Progress'. The script will then alter the due date of these records by one day. The script i have written however successfully moves the records forward by one day but doesn't consider the status. It moves all records regardless. Please see my script below and i would love some assistance on what tweak is needed in order to accomplish this. Problem comparing the contents of the status field with the string 'In Progress' ?' Script - Set Variable [ $TODAYSTASKS ; Value: Tasks::Due Date = Get(Current Date) and GetField ("Status") = "In Progress"] Go to Record/Request/Page [First] Loop Set Field [Tasks:: Due Date ; Get ( Current Date ) + 1] Go to Record/Request/Page [Next ; Exit after last: On] End Loop Thank you very much for anyones help in advance Tom
  5. This might be helpful https://www.geistinteractive.com/2018/03/13/filemaker-json-parsing-generator/
  6. The problem here is not curly braces, but square brackets. Same as with your previous question, these signify an array whose objects need to be accessed by their index number. In this case there is only one object, so the expression: JSONGetElement ( $$_JSON ; "list[0].weather[0].id" ) will return 801. Do note that list is also an array and it contains no less than 40 objects. The above expression extracts the weather id value from the first object only. Not all objects have the same weather id value, for example: JSONGetElement ( $$_JSON ; "list[2].weather[0].id" ) returns 800. How to solve such problems in general: It is very convenient to use the JSONListKeys() function to analyze the given JSON and help to select the next step in your keyOrIndexOrPath expression. Starting with an empty path, the expression: JSONListKeys ( $$_JSON ; "" ) returns: city cnt cod list message If you pick list, then: JSONListKeys ( $$_JSON ; "list" ) will tell you there are 40 objects to pick from. If you pick the first one, then: JSONListKeys ( $$_JSON ; "list[0]" ) will return: clouds dt dt_txt main sys weather wind Next: JSONListKeys ( $$_JSON ; "list[0].weather" ) returns "0". This is how we know it's an array containing a single object. And finally: JSONListKeys ( $$_JSON ; "list[0].weather[0]" ) gives us: description icon id main allowing us to construct the final path used above. -- Note that the dots after the index predicate are optional; the expression: JSONGetElement ( $$_JSON ; "list[0]weather[0]id" ) will work just as well.
  7. PGE

    Email attachments

    I have a script that generate two different e-mails, one with the attachment and one that contains the e-mail address. Has anyone an idea on how to get them combine somehow so that just one e-mail would be generated? Go to layout ["Faktura" (KSF medlemslista)] Save Records as PDF [Restore; "No dialog; "untitled.pdf"; Create email; Current record] Send Mail [Send via E-mail Client; To: KSF medlemslista::e post: Subject: "KSF medlemsavgift 2020"; Message: "Medlemsfaktura som pdf bifogad”; "untitled.pdf") Go to layout [original layout]
  8. Hi Comment, Yes, there was an error in the text I posted here. Apologies. Your solution worked well all the same. At the risk of wearing out the welcome mat... Whilst: JSONGetElement( $$_JSON ; "list" ) JSONGetElement( $$_JSON ; "list[0].main.temp_min" ) retrieves that (minimum temperature data) OK, how do I access the data of weather ID please? It appears to be one level "deeper" within curly braces? I tried: JSONGetElement( $$_JSON ; "list[0].weather.id") and too many guessed variations of this but failed to nail it. Thank you again. Greg Sample.JSON
  9. Yesterday
  10. Ok, got it! Thank you so much Comment. Cheers, P.
  11. Resolved by opening a backup, removing any on open or on close scripts, removing any custom menus and then restoring the window and resizing to a more appropriate size.
  12. it would still be a button. But it would simply do: Set Field [ Preferences::ProductCodeColorNumber ; 1 ] or another number between 1 and 8. No. Each product code stores a single color number, so you only need a simple Number field, with no repetitions. The number field needs no visual cues. It doesn't even need to be shown. You can apply conditional formatting to the ProductCode field, using the same rules and same colors as for the Status field in Products. -- Note: This is all assuming you want to use conditional formatting. If you prefer, you could store the RGB values in the Preferences table and apply them by auto-entering a calculated value into the Status field using TextColor(). But then changing the colors in Preferences becomes more difficult to apply to existing records in Products.
  13. Can anyone help me,how to filter portal with dropdown list,using global fields?
  14. Thank you Comment, Sorry, I lost you at "store a selection in your preference table". As per now, each color dot on the Preference table is a button. Do I need to change that and create a number field named "CodeColorNumber" with a repetition of 8 or maybe create 8 number fields, each one with a different value? How could I assign a visual cue to a number field? For the second part I understand the relationships between Products and Preferences with the matching Status - Color Code. Thank you
  15. Excerpts from my “FileMaker 17 Performance Lab” session are available, covering some of the topics not covered anywhere else, as well as from my presentation of upgraded demo integrating 11 hardware technologies. Take a look at highlights of the FileMaker Konferenz 2018 and learn how field dependencies can slow down your Set Field, how to minimize the impact of slow network connection, why to avoid overusing conditional formatting, how to benchmark and optimize layout rendering, or how to integrate RFID, NFC, mobile printer, motors, digital scale, and other hardware with FileMaker app running on iOS. Click here for the whole article and videos
  16. Not sure I understand what exactly is your question. The colors used in conditional formatting must be preset in advance. They cannot be calculated or set by script. If - as it seems from the screenshots - you want to allow users to pick a color from a fixed selection of preset colors and assign it to a product code, you could store the selection in your preference table as a simple number (from 1 to 8, in your example). Then you can define 8 rules for your conditional formatting along the lines of: Preferences::ProductCodeColorNumber = 1 and assign one of the preset colors to each rule. Note that this requires a relationship between Products and Preferences matching Status to ProductCode.
  17. Hello everyone, I have a Preference table with status options. The user can create a new status and through a script can assign a color (see attachment). The calculation is the following: Allow user abort [off] Set error capture [on] Set variable [$start ; value: Get ( ActiveSelectionStart )] Set variable [$end ; value: Get ( ActiveSelectionStart ) + Get ( ActiveSelectionSize ) -1 ] Insert Calculated Result [ TextColor ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize) ) ; Get ( ScriptParameter ) ) ] Set Selection [ StartPosition : $start ; End Position : Send$ ] The ScriptParameter has the color values in RGB: RGB ( 237; 41; 190). The Status field is pulled into a Value List for the Product table. Is it possible, once the status is used in the Product table , to convert the text color into a conditional formatting? Is my approach wrong? I am trying to give the user some flexibility. Thank you for guiding me.
  18. Last week
  19. Not everyone likes to mess with Custom Menus but sometimes they are necessary. Senior engineer Calvin Mosiman is back to show you what the process of setting up your own Custom Menus would look like. To catch future live streams, check out the streaming schedule at: https://fmtraining.tv/#LIVE support@rcconsulting.com www.fmtraining.tv www.fmstartingpoint.com www.rcconsulting.com
  20. Very kind of you, thanks! I'll let you know when the project is successfully finished!
  21. I too would recommend against using a repeating field for this. Splitting lines of text into separate related records is very easy, and you don't need to create repeating variables or find the positions of carriage returns for this. Just do something like: Set Variable [ $n; Value:ValueCount ( YourTable::Textfield ) ] Loop Set Variable [ $i; Value:$i + 1 ] Exit Loop If [ $i > $n ] Set Variable [ $line; Value:GetValue ( YourTable::Textfield ; $i ) ] At this point the $line variable will hold the current line and you can go to the child table, create a new record and populate the name field with the name extracted from the $line variable. I am not sure how exactly to do the extraction, since you've listed several options but did not provide any rules for distinguishing among them.
  22. Yes as this is the folder where the generated thumbnails are stored, per resolution. You can have multiple resolutions in the case you are specifying height and width in the URL and/or SuperContainer will automatically create a new resolution based on the size of the web viewer or browser you are using to access the file. When you use the /Files URL these are the images that are actually served. Deleting this folder will cause SuperContainer to need to re-create the thumbnail once this files are accessed again in a browser. If you want it to not create thumbnails and rather serve the raw file, use the /RawFile URL Having the files on the SSD will definitely improve read speed but then it sounds like the "bottleneck" will be the network instead of the hardware.
  23. Hello, Thank you for bringing this to our attention. I have reported it to our developers and have created an issue in our issue tracking system. We will be bump this post when it has been addressed.
  24. Yes, probably you're right! In the text field the script is meant to work on, each line contains an actor's name, and the respective character in a movie, arranged in various ways, e.g. separated by a specific word ("as") or a colon, or with brackets around the characters. Sometimes, the names are first, sometimes the characters. I want to extract the names only and put them in a repetition field. (I know, users are discouraged to apply this feature, but I'd like nevertheless to keep this structure, rather than unravel and reorganize it.) The entire script has grown over time, with ever more versions of how names and roles are assembled in the movies' informations; that is why it certainly is somewhat discombobulated.
  25. To make the window of solution smaller : I think the problem is some difference between Internet Explorer on one hand and Safari/Chrome on the other. I exported my HTML from a field, to an .html file. It works fine on IE, but not on Chrome on the same Windows machine. Still haven't figured why.
  26. That's too bad and you should definitely get them to fix it. But I am curious how it's possible that: For me, it returns an error: ? * Line 11, Column 2 Missing '}' or object member name
  27. I'm getting this error when I attempt to list files in an S3 bucket in the eu-west-2 region. com.prosc.aws.exception.AWSRuntimeException: <?xml version="1.0" encoding="UTF-16"?><Error><Code>InvalidRequest</Code><Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message><RequestId>B67BF8D52F9A5E79</RequestId><HostId>TdW+BZFS3xxBM9pnQGLC4c8ha7jfpXwg2OJQKCovCEs5GNUM5wN3fd+lhBr8PvGbm9K/V9SwMHU=</HostId></Error> A quick search led me to this, which directed me here. Is there a way to specify the version so it uses AWS4? Thanks in advance
  28. I am glad you got it sorted. As an aside, I am not sure what exactly you're trying to accomplish here, but I suspect there is a simpler way.
  1. Load more activity
  • Create New...

Important Information

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