Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 07/01/2024 in all areas

  1. LaRetta was one of the most fiercely loving and loyal friends I've ever had, despite never having had the pleasure to meet her in person. I'm so blessed to have worked with her until the end. She was unashamedly opinionated and caring, about people, justice, and about our craft. She sent me this passage from Barbara Kingsolver late last year: And she followed it with: I love you LaRetta, and miss you dearly. Guess I'm a little hokey too. ❤️ Your friend, Josh
    2 points
  2. Here is another way you could do this. It uses conditional formatting to identify the exact items that cause the conflict with other orders. Again, more work is required if you want to see exactly which overlapping order has the offending item, but it might not be worth the trouble. BookingItemsConflict.fmp12
    2 points
  3. Is it safe to assume the context is an Order with a portal to LineItems? If so, I would do something like the attached. Re your calculation, I don't understand the logic it attempts to implement. And I don't think it can be done by calculation alone. Depending on the format you need this, there may be a much simpler alternative: sort your line items by ProductID and use a summary field that counts them with restart. This will work if you print your orders from the LineItems (as you should), as well as in a sorted portal. SimilarChildrenNumerator.fmp12
    2 points
  4. Such manipulation is certainly possible, using either the While() function or a recursive custom function or even a looping script. However, it is far from being a convenient way to process data. Filemaker is designed to store data in a structure of records and fields - and it has plenty of built-in tools to assist in processing such data. In the given example, sorting the data by date and by employee, and summarizing the amounts (?) using a summary field would allow you to produce the expected result much more easily. If your data is actually structured properly as a table of Employees and a child table for the amounts (where each amount is a separate record with fields for Date, EmployeeID and Amount) then I would suggest you start there instead of producing the "Input List" first then try to wrestle with it.
    2 points
  5. The simple method is to open a new window, isolate the current record and do the export. Then close the current window to return to the original found set. Alternatively you could switch to a layout that has the fields you want in the order you want them and do Save Records as Excel from there. But if that's all such layout would be used for, it's hardly worth the effort.
    1 point
  6. It won't happen in the 1st file until you populate the Data__lxn field in the newly created child records. It will happen in the 2nd file, but only after you commit the record (that's a good thing: you don't want portal records to fly up and down while you're still working on them).
    1 point
  7. For the next version of MBS FileMaker Plugin in 15.3 we add the Window.SetRoundCorners function to provide round corners. At the recent Vienna Calling conference a developer asked if we can get the edges of the card in FileMaker to be round. And yes, that is indeed possible. Once the card is shown, the MBS Plugin can find the card window and apply round corners to it. This even works on Windows: This seems to work fine in FileMaker Pro on macOS and Windows. It does of course not work for WebDirect or FileMaker Go. To add the round corners, you simply call our plugin function Window.SetRoundCorners just after showing the card. The plugin finds the front window and applies them. Here is an example: Show card with round rectangle: New Window [ Style: Card ; Name: "Card" ; Using layout: “Tabelle” ; Height: 400 ; Width: 600 ] Set Variable [ $r ; Value: MBS("Window.SetRoundCorners"; 0; 12) ] Please try with 15.3 plugin and let us know how well it works for you.
    1 point
  8. This file shows how I would approach this using the aforementioned method of filtering a portal to display only unique values. A few notes: For simplicity, I have left out the Positions and Subjects tables and used meaningful values for PositionID and SubjectID in the Assignments join table instead. This has no impact on the calculation formulae that need to be used. To some extent, this is a cop-out: I believe I could have done without the cCombinedKey field in the Assignments table. But it would have taken some time and - perhaps more importantly - the formula used for portal filtering would be much more difficult to understand. A note about your setup: I don't understand why you need the Levels table. Does it hold any other information besides an ID and the level? It seems to me that a custom value list of these levels would be quite sufficient. The other thing that puzzles me is the checkbox of these levels shown in your screenshot. It looks like users actually select multiple levels for each unique combination of Position and Subject, and your script breaks these down to individual records. And now you are asking how to combine them back to the original form? Wouldn't it be easier just to store the data as entered by the user? Link to the file (expires in 24 hours): https://wormhole.app/3D9xaz#GF8aSO2FXKXPIp8mfOLBkQ
    1 point
  9. Did you notice that MBS FileMaker Plugin 15.2 includes a new feature to add keyboard shortcuts for the result data types for a formula? If you visit the manage database dialog, you can use keyboard shortcuts to pick data types for a field: Text ⌘ T Number ⌘ N Date ⌘ D Time ⌘ T Timestamp ⌘ M Container ⌘ R Calculation ⌘ L Summary ⌘ S If you define the formula, you get a dialog like the one shown above. The MBS Plugin looks for the popup menu on the bottom left and adds the same shortcuts for the data types. If it finds the menu, it adds the shortcuts to the menu entries. This way you can press e.g. command-T to pick text. Just a little convenience, but our clients asked us for it. Enjoy!
    1 point
  10. 🕯️ I was informed today of the passing of @LaRetta this past February. Thank you LaRetta for the many years of sage wisdom and insights to our community you will be missed!
    1 point
  11. This is indeed a great loss to the FM community. No one can equal her sharp eye for mistakes and her ability to pull a great idea out of a bucket of mediocre ones. Above all, her good spirits and great sense of humor made it a pleasure to collaborate with her. It was a privilege to know her.
    1 point
  12. It wouldn't have worked even with an indexed field, because a value list based on a field will never include a blank value. You could define a calculation field in the related table that combines the "real" value with a placeholder, for example: List ( Valuefield ; " " ) Then define the value list to use values from this calculation field and (if necessary) make the target field auto-enter a calculated value substituting 3 consecutive spaces with nothing.
    1 point
  13. Well, yes - if you are joining 2 tables, and both tables have an id field, then you must specify from which table the values of id should be fetched, e.g. SELECT \"ESQL_Cities|Sel\".id instead of just: SELECT id As an aside, I doubt ExecuteSQL() is a good tool to use here. Do a search for "dwindling value list" to learn some FM native methods.
    1 point
  14. I suggest you take a look at the attached file (which is your original file reduced to the minimum + my suggestion). Do note that there are two fields stacked inside the portal. ActiveStaff.fmp12 That's a problem. If the field is formatted to use a value list showing only active staff, it cannot be used to select inactive staff. You will have to find a way to use another instance of the field in Find mode. Or switch to completely different selection method (e.g. a card window). Here is a rather simple one: ActiveStaff+Find.fmp12
    1 point
  15. The space character is the character immediately after the last hyphen in the text. Suppose the text were just: "a - b". The length of this text is is 5, and the position of the hyphen is 3. 5 - 3 = 2, so your expression: Right ( db ; len - lastSpace ) will return the last two characters of the text, i.e. " b". It depends. If the hyphen separator is always followed by a space, you might simply subtract it: Right ( db ; len - lastSpace - 1 ) A better solution would look for the position of the entire separator pattern " - " (a hyphen surrounded by spaces) and do: Let ( [ len = Length ( db ) ; lastSeparator = Position ( db ; " - " ; len ; -1 ) ] ; Right ( db ; len - lastSeparator - 2 ) ) This would allow you to correctly extract "Carter-Brown" from "Smith - Jones - Carter-Brown". If you cannot be sure the space/s will always be there, you may use Trim() on the result (this is assuming the extracted portion will not contain any significant whitespace characters).
    1 point
  16. That's normal if that was the case when you did your original sync with that database --Jesse Barnum
    1 point
  17. I see two problems with your request: First, if you have a user named Smith and another user named Smithson there is no way to know when the user enters "the last letter of their login name" unless you already know who is trying to login (in which case why bother with a login procedure?). The other problem is much more serious: it seems you are designing your own "login" procedure that works after the user is already logged in somehow (possibly as a guest?). This is an extremely bad and dangerous practice - see here why:
    1 point
  18. I am afraid we are not talking about the same thing. My suggestion is to divide the problem into two parts. In the first part you define a self-join relationship of the Orders table that identifies orders that overlap the current order's time span. This is easy to do using the existing, stored, fields of the Orders table: Orders::DateIn ≤ Orders 2::DateOut and Orders::DateOut ≥ Orders 2::DateIn and Orders::OrderID ≠ Orders 2::OrderID The second part is to identify which of the overlapping orders are conflicting - i.e. have a same product. This could be done in a number of ways, for example filtering the portal to Orders 2 by a calculation of: not IsEmpty ( FilterValues ( Orders::ProductIDs ; Orders 2::ProductIDs ) ) where ProductIDs is an unstored calculation field = List ( LineItems::ProductID ) Any records displayed in such filtered portal would be conflicting. You will have to make an additional effort to see exactly why they're conflicting, but perhaps it does not matter? Anyway, the idea is that the number of overlapping orders should be fairly small, so using an unstored calculation to find the conflicting ones among them should be sufficiently quick. Otherwise I see no choice but to move to a denormalized solution where the dates need to be replicated in the LineItems table, and you must take great care that this happens on every relevant layout, in every relevant scenario. --- Caveat: untested code.
    1 point
  19. That's actually wrong. You may not notice it's wrong if your date is never a Sunday, but in such case your formula will return the date of the following Monday - i.e. the starting day of the next week. The correct formula to use would be: date - DayOfWeek ( date - 1 ) + 1 ; I don't see that I made any suggestion regarding portal filtering - other than to warn you that it will get slow as your number of records increases. I think that could be simplified to: IsEmpty ( Employee::gFilter ) or Time::Week_Start = Employee::gFilter If that doesn't work the same way for you then there is something wrong with the data in one (or both) of the fields.
    1 point
  20. I see the same thing (in version 18). This is apparently a bug. But the solution is simple: do not go back to the script. And if you do, do not click OK. Or switch it back to 'File' before clicking OK. Or do not save the script changes.
    1 point
  21. Mmm... maybe I spoke too soon. Now that I have implemented the suggested solution myself, I notice a nasty "jump" as the popover settles in its place. Still, it's something worth learning - and the flaw may be be less noticeable in your situation where you need less padding. The great advantage here is that it's all done just by styling the popover object components (popover, popover content area and padding), with no need for extra buttons, scripts, script triggers and what have you. PopoverContentArea.fmp12
    1 point
  22. @fbugeja I notice you have cross-posted this question on Claris Community. This doesn't happen very often, but the answer you received there is better than any of the other options mentioned here. It may not be easy to understand at first glance, but I think it's worth spending the necessary time to learn it.
    1 point
  23. What you ask for is impossible to do precisely. The reason for this is that the popover area is always positioned with its center aligned with the popover button. If your button is positioned to the right of the center of the area you want to cover, there will be either a slit exposed on the left side, or an additional band covering stuff on the right side. Or a little bit of both, as you can see in the attached file where I have adjusted the right-side popover to the approximate dimensions. There are other methods that would allow precise positioning of the covering area, such as a card window (already mentioned) or a popover with invisible button that you pop open with a script, or even a slide control. AUSCOIN+.fmp12
    1 point
  24. I would use a card window to ensure precise sizing and placement . You’ll find how to do so by referring to Dan Smith’s card positioning demo file here.
    1 point
  25. Hey Ocean, Great question. Check out our documentation on resetting the audit log here. If you're interested, here's the explanation: The audit log keeps a record of past changes to allow MirrorSync to merge conflicts, however it can get huge, up to a maximum of 1 TB. The solution is to use the configuration client to reset it. Log in, right click the configuration, mouse over Reset SyncData and click "Only AuditLog". Despite its size, the audit log isn't critical to MirrorSync's function; you won't need to replace your spoke or even expect much longer syncs after you wipe it out. You may not even notice the downside: that MirrorSync won't be able to merge some record changes after you delete the audit log. However, after resetting this problem will quickly resolve itself; after a few days of normal use it'll be as though nothing happened, and you'll have your ~80GB of space back. Hope that clears things up! - Adam
    1 point
  26. The term you're thinking of might be, not magic key, but 'multi-key.' It can indeed be quite useful, not only for going to related records, but displaying those records in a portal.
    1 point
  27. Here's a basic demo of what I meant: PendingElsewhere.fmp12
    1 point
  28. Just thinking out loud for a moment: I think the obstacle here is printing the orders for your staff. To send an email confirming the order with a PDF of the order attached to it, you could use a script performed on the server (this needs to be checked). But the Print command is not supported in PSOS and printing on the customer's machine would not help, even if it were easy.
    1 point
  29. Filemaker has a simple and reliable mechanism to number all records in a table (regardless of type) sequentially: https://help.claris.com/en/pro-help/content/automatic-data-entry.html Your proposed numbering scheme, which would require maintaining a separate series for each type, is not simple to implement - esp. in a multi-user scenario where you run the danger of two users creating a new record at the same time and ending up getting the same serial number. This may not be a task you want to undertake if you are "brand new to FMP". I would advise you to just number all your records sequentially. I doubt anyone will notice the difference. Note also that you don't need a series of custom dialogs to get user input for a new record. They could just fill out the fields directly on a layout and commit the record when ready. Even with a custom dialog, the user can populate up to 3 fields/variables in a single step. And don't use global variables (prefixed with $$) where script variables (prefixed with $) will do.
    1 point
  30. I presume you are talking about the macOS Character Viewer? You can open it from the Input menu . Re your 2nd question, consider using custom menus or macOS Shortcuts. Please update your profile with your version and OS.
    1 point
  31. Question #1: The 2nd parameter of FieldComment() is fieldName. You are supplying the field's value. It would work with: FieldComment ( Get(FileName) ; "template::template_field_name_01" ) but since we don't want to hard-code the field's name, we prefer to use: FieldComment ( Get(FileName) ; GetFieldName ( template::template_field_name_01 ) ) which can be shortened to: FieldComment ( "" ; GetFieldName ( template::template_field_name_01 ) ) And if (as one would assume) the tooltip is attached to the field with the comment, you could use simply: FieldComment ( "" ; GetFieldName ( Self ) )
    1 point
  32. I would do it like this: Enter Find Mode [ ] Set Field [ YourTable::ClientName; $searchClient ] New Record/Request Set Field [ YourTable::CaseNumber; "*.*" ] Omit Record Perform Find [ ] where $searchClient is the client name you are looking for. --- P.S. Please update your profile with your current version.
    1 point
  33. See how this one works for you. A couple of points worth mentioning: There is a script trigger attached to the PersonID field in the portal; The cAssignedPersonIDs calculation field is set to evaluate always; In your file the value list is defined to show only the names. This is possible only if you know that the names are unique. DwindlingVL.fmp12
    1 point
  34. Here is the relevant portion from a script I posted somewhere: Set Variable [ $filePath ; Value:"Exported.csv" ] Export Records [ “$filePath” ] Open Data File [ “$filePath” ; Target: $myFile ] Read from Data File [ File ID: $myFile ; Target: $csv_data ; Read as: UTF-8 ] Set Variable [ $csv_data; Value:Substitute ( $csv_data ; Char (11) ; ¶ ) ] Set Data File Position [ File ID: $myFile ; New position: 0 ] Write to Data File [ File ID: $myFile ; Data source: $csv_data ; Write as: UTF-8 ; ] Close Data File [ File ID: $myFile ] As I said, this will replace the vertical tab characters in the exported file with carriage returns. However, that does not mean that every child name will be on a separate line. The carriage returns will appear only between the child names, not before the first one or after the last.
    1 point
  35. Hello tweller927, that does sound like Firewall issue. You can download the support files from our docs page here. Please let me know if you run into any trouble or if you have any other questions. Matt 360Works Support
    1 point
  36. Except for account name: https://help.claris.com/en/pro-help/content/running-scripts-on-server.html
    1 point
  37. I would leave the looping for the google sheets side of the matter, and only do this: Substitute( List( "theDate"; "Employee"; "Amount" ); ¶; Char( 9 ) ) & ¶ & Substitute( ListConvert::inputList; ","; Char( 9 ) ) ...on the filemaker side of it. The data in the OutputList, could then be copied, and then cmd-shift-V pasted into a waiting google sheet. When the formatted data has arrived into the sheet, the place the cursor somewhere in the middle of the pasted, and issue a pivot table command....Well I've made a film showing how to: Skærmoptagelse 2024-07-28 kl. 18.47.02.mov.zip --sd
    1 point
  38. I would use a script for this. I believe you need a script to get the data to Google Charts anyway, so that could be just a part of that. The tricky part here is that you need a "cell" in each line for every employee, even if they have no amount on that date. So I would do 3 preliminary steps: first, get a list of unique dates (sorted in chronological order, unlike your "Input List"). Then get a list of unique employees. Then use the "Fast Summaries" method to get the actual amounts to be charted. I would store these in a JSON object so they can be easily retrieved in the final step. The final step would use two nested loops: first, create a line for each unique date. In each line, create a cell for each employee and retrieve the corresponding amount from the JSON (which of course will return nothing for employees with no amount on that date). --- BTW, just for my own amusement I ran a script to summarize the "Input List" provided in your question. I had to correct it first because some lines have a space before the Employee N value. But the values I am getting are quite different from the ones shown in your "Output List". For example, you show the amount of 1482 for Employee 1 on 4 July 24 - but Employee 1 has no entry at all on that date!
    1 point
  39. And if you receive the data exactly as you've indicated, I would first convert it into tables and records as Comment suggests. Converting the import can be handled in a single looping script. Once normalized, you can generate reports, place portals on an Employee's layout, and anything else you can imagine. 😀
    1 point
  40. Sorry, I am not going to look at a script that has 46 or more steps... Yes. If there is no related record in the child table, then setting a field of the child table from the context of the parent will create a new record in the child table and populate the match field of the child to match that of the parent. There are some additional (undocumented) characteristics of this behavior that people have utilized; do a search for "filemaker magic key" for more reading on this.
    1 point
  41. 509 downloads

    Security Changes And Enhancements In FileMaker® Pro 21 By: Wim Decorte and Steven H. Blackwell The recently released FileMaker® Pro 21 new version continues the efforts of Claris/FMI and several members of the FileMaker Developer Community to enhance and improve the Security features in the products. In this White Paper Wim Decorte and I will discuss much of the Security information relevant to this new release as well as some aspects of other recent patches issued by Claris. Much of the specific discussion in the White Paper focuses on items within the purview and control of the developer, rather than of Claris, and thus it warrants more attention. These deal with issues that could cause an Escalation of Privileges for Subordinate Level Users.
    Free
    1 point
  42. You can construct the calculation along the lines of: List ( "image:Photos/" & ArtistName & ".jpg" ; "image:Photos/" & ArtistName & ".png" ) This will create both paths as a return-separated list. The container field will then go over this list and display the first image it can find.
    1 point
  43. https://community.claris.com/en/s/question/0D5Vy000006IQnpKAG/free-prompt-engineering-training-resources https://www.cloudskillsboost.google/paths/118 https://microsoft.github.io/AI-For-Beginners/ https://www.edx.org/learn/artificial-intelligence/harvard-university-cs50-s-introduction-to-artificial-intelligence-with-python https://www.coursera.org/learn/prompt-engineering https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/ https://www.deeplearning.ai/short-courses/llmops/ https://www.coursera.org/learn/big-data-ai-ethics https://www.edx.org/learn/computer-programming/edx-ai-applications-and-prompt-engineering
    1 point
  44. Here's a simple method to duplicate the found set: Unsort Records Set Variable [ $n; Value:Get ( FoundCount ) ] Loop Set Variable [ $i; Value:$i + 1 ] Exit Loop If [ $i > $n ] Go to Record/Request/Page [ $i ] [ No dialog ] Duplicate Record/Request // perform changes to the duplicated record End Loop
    1 point
  45. That makes it more difficult, since you cannot use the UniqueValues() function. See if the attached demo makes sense. In the real implementation, the value list would be defined to use values from the Customers table, of course. And the body part of the report would be removed (I kept it in just to check that the results are correct). Likewise the sub-sorting by CustomerID. You could probably do something similar with ExecuteSQL(), but then you would have to think how to present the result. CountUniqueInGroup.fmp12
    1 point
  46. Does the attached test work for you? InsertFromRedirectURL.fmp12
    1 point
  47. Trim( GetValue ( Substitute ( text ; "/" ; ¶ ) ; 1 ) ) This will give you the first value. Replace the last '1' with a 2 to retrieve the second. Hey Bruce, I agree that it is good to study ALL functions but there are 45 text functions so it certainly doesn't hurt to provide a solution from which to learn, no? :-) BrainOnAStick, you might wish to protect from a field with more than one front slash. For instance, what if an address is 141 1/2 E. Main, for example. Just be aware of the potential problem with it.
    1 point
This leaderboard is set to Los Angeles/GMT-07:00
×
×
  • Create New...

Important Information

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