Jump to content

David Jondreau

Members
  • Content Count

    2,089
  • Joined

  • Last visited

  • Days Won

    25

David Jondreau last won the day on August 14

David Jondreau had the most liked content!

Community Reputation

76 Excellent

1 Follower

About David Jondreau

  • Rank
    Huzzah!

Profile Information

  • Gender
    Male

Contact Methods

  • Website URL
    http://www.wingforward.net

Recent Profile Visitors

16,244 profile views
  1. David Jondreau

    Toggle two fields

    Say you’ve got two fields, both number fields, and you want to use them as flag fields, to be set to either 0 or 1. But they should always be opposite from each other. Changing one field should change the other and vice versa. At first, that seems simple. You just need to make each field an auto-enter referencing the other field, right? Nope. That doesn’t work. FileMaker’s calculation engine does not like that sort of circular references. Field A changes so Field B changes so Field A changes, etc. Nothing terrible will happen, it just won’t work. I played around with a couple ideas and the one that works is this: Flag1 = Let ( [ f1 = Flags::Flag1 Final ; f2 = Flags::Flag2 Final ] ; If ( $$f2.active ; not f2 & Let ( $$f2.active = “” ; “” ) ; Let ( $$f1.active = True ; f1 ) ) ) Flag2 = Let ( [ f1 = Flags::Flag1 Final ; f2 = Flags::Flag2 Final ] ; If ( $$f1.active ; not f1 & Let ( $$f1.active = “” ; “” ) ; Let ( $$f2.active = True ; f2 ) ) ) You may wonder what the heck is going on here! In short, two things. The field is checking to see if it’s the one that was edited, then editing itself based on that knowledge and then handling the $$variable that communicates that. If [the other field was edited] then change this value to the opposite of that field and clean up the variable. If [this field was edited] set the variable so the other field knows it’s being edited, and just set the field to itself. Using Let() to define (and clean up) $$variables inside a calculation is not common, but is powerful and handy in certain situations. Enjoy! View the full article
  2. David Jondreau

    DevCon 2018 Review

    DevCon 2018 was held at the Gaylord Texan Resort and Convention Center win Dallas, Texas from August 6th through the 9th and it was a great event. The Gaylord Texan (GT) is a destination unto itself. It’s enormous with several acres of open ground enclosed by a dome and a combination of a convention hotel and a family destination. There were a couple other conferences going on, including, notably, QuakeCon with hundred of video game fans hauling their heft PC towers and giant monitors through the lobby. There was plenty for kids to do like a couple of Smurf villages and a live action Gargamel, an Escape Room, a pair of pools, and a full-bore water park. The gym was substantial for a hotel and there were four in-hotel restaurants, not that we needed any. The conference-provided food was plentiful, delicious, and Texan-themed. The GT was an A+ hotel choice for DevCon. FMI staff did a great job with registration and sessions. As a first-time speaker this year, I had a different view from years past. I skipped more sessions than I normally would to prepare and was acutely aware of room sizes and audio/visual infrastructure. And I got to see how FMI treated its presenters. With no reservations, I felt everything was handled professionally and generously. Everyone was just real nice and got their jobs done, mostly notably (for us speakers) Eric Evers and Rosemary Tietge. What more could you ask for? The main events: the Keynote, Special Session, Attendee Party, and Closing Session & Awards Presentation were stellar. These were all held in a giant ballroom, away from the main convention center and session rooms where they had the space to hold all attendees. The Keynote (the specifics being under a non-disclosure request) demonstrated a few important things. One is that FMI has listened to the FileMaker developer community’s complaints over years and become vastly more transparent about the future of the product. FMI has been presenting roadmaps and future release information for a couple years now, and they’re continuing with the openness. Also, it’s clear that FMI is embracing multiple technologies, with a goal for FileMaker to be integrated with all available web technologies. This is a big step for FMI to embrace. If FM developers work with other technologies, if they become fluent in Javascript and JSON, plumb the depths of APIs and REST, couldn’t they just leave FileMaker and move into other areas? That has to be a concern of FMI. But FMI clearly believes its product adds value to the wider tech stack and they’re pushing forward and that’s amazing. It’s shedding any vestige of an inferiority complex. The Tuesday morning Special Session gave FMI’s marketing department an important voice.The main speaker for this, Richard Cox Braden was inspiring. A fantastic choice. With the new designation of “Workplace Innovation Platform”, FileMaker is claiming its spot between expensive enterprise software and free / low cost general-use utility apps. It’s a good place to be. Texas was the big theme at the convention and the attendee party included live country music, line dancing, and barbecue. Also giant a cornhole game with the boards painted as the Texas state flag. Plus giant chess sets, soccer billards, and regular shufflepuck. It was super fun. The closing session was as well-produced as the rest, with good-natured announcements of various community awards, and a lot of humor. The whole conference was simply a great event. I know I sound like a gushing schoolboy here, but if there’s nothing worth criticizing, I’m not going to throw in some minor objection just to appear balanced. This was an extraordinarily well-organized event and I’m proud to have been a small part of it. View the full article
  3. David Jondreau

    Fasting

    In the blogs and forums I favor, there’s a buzz over the past few years about “intermittent fasting”. The idea is that not eating all the time is healthy. As far as physical and emotional health benefits, the pop science seems intriguing and it meets my common sense filters, so why not try it? There’s a few different versions. 16/8 is popular. That’s where you only eat in the same 8 hour window each day. Say, from 10 AM to 6 PM. That’s sounds helpful, something I would call “time-restricted eating” more than fasting. I can do that unintentionally depending on how my day rolls out. I want to fast though. There’s “24 hours:. Pretty self-explanatory, where you don’t eat after dinner one day until dinner the next. There’s 5:2 where you eat a small number of calories, 500 or so, two non-consecutive days a week. All fine. For me though, I’m trying full fasting. That’s no food from when I go to bed on Day 1, until when I get up in the morning on Day 3. A 36 hour fast. Two nights. That will give me the chance to feel hungry and give my digestive system a break. And I’m doing that every six days. I like the idea of doing it weekly, but doing it the same day, like every Tuesday or every Sunday doesn’t seem sustainable. No Sunday brunch ever? No way. A birthday dinner on Tuesday means a cheat day? Nah. I’d rather be consistent. Every six days means the day of the week changes each time. I put “FAST” as an all-day event in my Google Calendar, set it to repeat every six days, and follow along. It’s been three weeks so far, and it’s going great. View the full article
  4. David Jondreau

    Modified timestamps and importing

    At DevCon 2018, Molly Connolly led a session on data cleaning. During that session, there was a question of how to import data without updating the Modification timestamp. The goal is to display when a user last modified a record, not the developer. Two methods* of doing that were mentioned but there is another, more robust, answer. It’s simple and flexible: create an additional field that references the Modification Timestamp field and set a variable flag when you don’t want to update it. Let’s call the default modification timestamp field “ModificationTimestamp”. Then the new timestamp field should be an auto-enter calc with the calculation of: If ( $autoEnterOff ; Self ; ModificationTimestamp ) Then, at the start of the the Import script, set $autoEnterOff to True. Some benefits? It’s simple You never have to modify field definitions after the initial set up You never have to modify scripts after the initial set up It’s local to the current session. Other users won’t be affected. You can use this in other scripts, such as a scheduled server script that performs a nightly update. You can use a global variables $$autoEnterOff instead or in addition to script variables and perform developer hand-edits. *There were two other options discussed during the session. One to actually turn off the auto-enter option before the import and then turn it on again afterwards. I would strongly recommend against getting into changing a field definition on a live file. Plus user modifications that happen while you’re importing won’t be logged. The second way is to change the Import[] options to not use auto-enter options. That can be complicated by wanting some auto-enter options to fire, especially when adding new records (for primary key options). I can also imagine a more complicated scheme that involves multiple imports, or exporting timestamps and importing, etc. But why bother? The above method is simple with no drawbacks except an additional field. Additionally, you can display the user account that wasn’t a developer who last modified a field by changing the ModifiedBy field. Uncheck the auto-enter AccountName option and change the field to an auto-enter with a calculation of: If ( $autoEnterOff ; Self ; ModifiedBy ) where ModifiedBy is the default auto-enter “Modification Account Name”. Sample File DevAutoEnter.fmp12 View the full article
  5. We've got SuperContainer running on FMS 14 and have run into a weird problem. We're storing mostly pdfs, but also some jpgs and pngs. For the jpgs and pngs, we've been experiencing an occasional oddity that I finally tracked down. These are image files that, for the most part, users take photos with their phones then upload via CWP. Image sizes range from 500 KB to 2 MB. The issue arose because we resize the image files and convert them to pdf, eventually collating them into a single multi-page pdf that needs to be email-able. Sometimes the resize would fail, giving the full image. The same files always failed. We were resizing using height and width tags and tried both SCGetContainer() and the regular Web Viewer. Using the 'resolution' tag in SCGetContainer() would fail to resize. Using the resolution tag in the Web Viewer would cause a complete failure to display the image, giving a 500 error from the server. After digging in deep, it appears the root cause is SCGetInfo can't see the height, width, or dimension tags in the file itself. Not all jpgs have this problem, maybe 10%. And it appears always the same users but *not* always that user (50% of the time). For those specific files, when calling SCGetInfo without additionalFields parameters gives the correct result. But adding height, width, or dimension arguments breaks SCGetInfo, giving a 500 error. Presumably, this rolls downhill breaking the 'dimension' tags in the Web Viewer. SCGetContainer(), and SCDownload(). So, in short, some image files are breaking SuperContainer around the 'dimension' tags.
  6. David Jondreau

    SCGetContainer & Orientation

    I've established that it's *not* orientation that's the problem. It's *resolution". I'll post a new thread.
  7. I'm seeing weird results using SCGetContainer() and I think it has to do with image orientation. I'm working with jpgs and it appears when an image is rotated. If GetContainerAttribute() "orientation" is applied to a file and the result is "6 (Rotated 90 degrees counterclockwise), not applied" then when I access that file using SCGetContainer() any width and height constraints are not applied. It will always return the full file. I have not tested it with other orientations. This is on FMPA 16.02 using SC plugin 2.9504. Any ideas? Have you seen this before?
  8. David Jondreau

    Protected: How to avoid collisions using UUIDs

    Hi Doug, I didn't realize my site was feeding FM Forums. That article is unlocked now. Thanks, David
  9. David Jondreau

    7 cool tools for better nerd living

    Hey, I didn't know my website was feeding this page! Cool, but I wish the formatting was better....
  10. David Jondreau

    7 cool tools for better nerd living

    If you’re a dev, you are a power user. Below are 7 digital tools that are indispensable, and not necessarily for coding. I don’t know if they share any common characteristics, except that when I don’t have access to them, I grunt in frustration. Nanny / LeechBlock / WasteNoTime Distraction is a huge productivity killer. For me, it’s the #1 issue in ‘getting things done’. I’m an info junkie and I have low self control. Me, making a living at a computer, is like being a recovering alcoholic and working at a bar. Except I’m not Sam Malone. I’m not even close. Buying a box of cookies and just ‘not eating’ them doesn’t work. What does work is not buying those cookies in the first place. That’s harder to do when working in a cookies factory. I love to read about a wide range of topics…current events, personal finance, urban planning. So, I’ve got to lock myself away from Facebook, reddit, twitter, washingtonpost.com, wsj, vox, 538, slatestarcodex, Mr Money Mustache, Bogleheads…well, you get the idea. But having access to those during work hours is majorly counterproductive. The solution? Browser add ons. I use one on each of my three browsers (Chrome, Firefox, Safari). These little utilities block access to sites of my choosing during certain hours. Very configurable, they lock away the liquor until it’s after hours. JumpCut JumpCut is handy little utility keeps track of your clipboard history. It ‘buffers’ your clips, keeping a history of up to 99 items that you can access and paste. Say I want to copy and paste four separate items, pieces of code, from a website to a Data Viewer. By default, that process is: copy, navigate to the Data Viewer, paste, navigate back to the website, repeat 3 more times. With JumpCut, it’s copy, copy, copy, copy, navigate to the Data Viewer, paste, paste, paste, paste. It’s one of those things you *have* to try. I’ve configured JumpCut so cmd-shift-V brings up the clipboard popover, then arrow keys move through my history. I use this shortcut at least 10 times every hour, every single day. Boomerang Boomerang is an app that integrates with Gmail and does two very cool and very different things: schedule emails and bounce emails back. Scheduling e-mails is great. I use it in two situations. If I’m emailing at 2 in the morning and I want to reply to client, but I don’t want to look like an workaholic nutjob. I use Boomerang to actually send the e-mail at 7:30am instead, looking like an industrious, early rising professional. The other situation deals with that feeling when as you hit ‘send’ and you think ‘Oh, crud, that wasn’t right’. Gmail has a great ‘Undo’ feature. Start with that. But the max time is 30 seconds. If I’m sending an email and I’m not sure if my choices around tone or content are the best, but I need to move on, I will schedule to send it in 30 minutes, allowing me to ‘let go’ but leaving open the option of revisiting it if I realize I should have rewritten. Your smile when you use boomerang Bouncing e-mails back is super helpful. I’m a fan of Merlin Mann’s Inbox Zero. I use my inbox as a To Do list. If it’s in there, I need to deal with it. *For the record, at the moment my inbox has 12 emails, and I never let it get above 50. Some tasks, however, need to come back on my to do list. For example, I’ve got to get credentials from a client in order to work on their solution. I’ve emailed them but got an autoresponse that they’re away for 3 days. I don’t want that task sitting on my to do list, because I’m waiting on someone else. So I set the email to “Boomerang” in 4 days. The email will leave my inbox and pop up again in 4 days if I don’t already receive a response from the client. Brilliant! MonkeyBread Solutions MBS has produced the Amazonian rainforest of FileMaker plug-ins. With over 4,500 different functions, it’s an entire ecosystem, packed to the brim with medicinal plants. It’s well worth the $149 price. More awesomely, there’s two incredibly useful developer tools built into the free demo version: The ability to search scripts and the ability to search the relationship graph. Install it, you won’t know how you lived without it. LastPass or any password manager If you’re not using a password manager, you’re being unprofessional. LastPass is the one I use. I haven’t tried KeePass or OnePass or any of the others, I’m sure they’re fine. Pick one and use it. Use a super secure master password (try the Correct Battery Horse Staple method with some of your own modifications), then let your encrypted password store of choice do the rest. I’ve got about 600 entries in my LastPass account, so “the rest” covers a lot ground. I don’t use the un-encrypted EverNote, no I use LastPass. With it I: Generate random 16+ character passwords. Updated all my sites so I’m not using the same P455w0rD on each. Create random 6 letter pronounceable passwords to use as the answers to security questions. Store credit card numbers, including the CVV code. Store configuration details for FM Servers. Attach a copy of SSL files to my client’s ‘note’. Store the VIN of my car. Store the make and model of my lawnmower. Mint.com Like most of humanity, financial security is important to me. One of the cornerstones to financial understanding is creating a budget. Whether you think budgets are prescriptive or descriptive, you should see where your money is going. Mint collates all your financial data in one place and allows you to assign income and expenses to categories you define. I have been using Mint since 2007. I check it at least twice a week, sometimes more. f.lux The human brain is a complex organ. There’s growing evidence that using a screen before bed can interfere with sleep, in large part because the screen emits blue light. f.lux adjusts the color temperature of your screen based on the time of day so that at night, your screen shifts red, encouraging better sleep. Now, you shouldn’t be using a screen in bed, but if you’re using it at night, use f.lux. I recommend all of these tools without reservation. Not that they’re perfect by any means, but they are indispensable. View the full article
  11. This content is password protected. To view it please enter your password below: Password: View the full article
  12. This content is password protected. To view it please enter your password below: Password: View the full article
  13. David Jondreau

    Two SC servers, one database

    Thanks for the reply. What is the downside to calling SCSetBaseURL()? Is there any way to determine what the current base URL is? (I'm aware I could capture it in a $$var, sure.) And would that method have fewer downsides that just calling SCSet? Is there a way to use a fully path, rather than calling SCSet? I am referencing files using as records in a table. Each record may have a different host. Therefore, when I want to reference a file, I have to know the existing base path to compare. Or just change it on the fly.
  14. I've got a couple SC licenses running on different servers. I've got one database and I want to store files on both servers. (why? well, I'm migrating from one server to another, but it's go to be done over a couple months due to bandwidth limitations). I'm storing each image's filepath as a record in a standalone table. That full filepath will be different depending on the host for that file. When calling any of the plugin functions by script, I believe got to also call SCSetBaseURL, right? That base host is either taken from the record (if downloading) or given based on business logic (if uploading). I want a calculated FM Container field using SCGetContainer(). I think I have to call SCSetBaseURL() in the calculation field as well. I've never used SCSetBaseURL() in a field definition, so I'm a little wary. I've tested it and it works. There's a slight performance hit. Is calling SCSetBaseURL() every time I call a SC plugin the best way to do what I'm trying to do? Is there a way to use a full filepath to SC rather than a local filepath for these plugin functions? Thanks and I love the product!
  15. When you make a new window, the current layout is reloaded and the OnLayoutEnter script trigger fires. The Orders List layout's triggered script ends in Halt Script[]. The Halt Script[] script step ends all running scripts, such as the new window script, so you never get to the Go to Layout[]. Use Exit Script[] in place of Halt Script[] in the Order List OnLayoutEnter triggered script.
×

Important Information

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