Record URL including layout?

Viewing 2 reply threads
  • Author
    Posts
  • December 14, 2022 at 6:29 PM #48484

    richard maliszewski
    Participant

    I have a MySQL+PHP Rube Goldberg inventory of our house’s crazy electrical setup: breakers, outlets, lights, switches, etc. It’s all in one flat table, but because I am doing queries with PHP, I can build up a context-sensitive display for each row type…breakers protect one or more outlets, switches, lights, other breakers. “Child” devices may control or be controlled by other devices, will always be protected by a breaker. Over the years, I’ve replaced a lot of our original light/fan/etc switches with z-wave or Homekit versions, and it just got too painful to go hunting for which breaker needed thrown to do the wiring, what other things would go down when I did. I put QR codes on things that were web-links to an in-house server running the PHP that provided their device ID. It’s really useful, and it works. But it’snot much fun to maintain, and we’re considering taking that server offline.

    When I did this initially, I was printing QR codes up on a label printer that maxed out at 160dpi, and the iPhone cameras were much worse at reading QR. So I was always tryng to keep the URL within the QR code as terse as possible. I just got a newer label printer that will do 360dpi. I printed out a QR code with it on 1/2″ tape for this charming URL:

    tapformz://record/view/db-c22e007efefb40638e5558a82914f121/frm-99b1e7b6445347d287775701b46e7b6f/rec-2ad4b9eb85bf42dd847068be513fb0ee

    And pointed my iPhone at it, and it asked “open in Tapforms?”, I tapped okay, and was at the record in question.

    So here’s the TF question: does the URL scheme provide a way to open a record in a specific layout? This would allow me the “context sensitive” behavior I am now getting programmatically via PHP. One layout for breakers, one for outlets, one for switches, etc. I know the layouts have IDs…is there somewhere to fold that into the URL? If so, then I can get this working via Tap Forms with a lot less overhead than my current setup.

    –Richard

    December 14, 2022 at 7:46 PM #48486

    richard maliszewski
    Participant

    I guess one way to do this would be to have the URL invoke a form script instead, with recordId as a parameter. Script could then look up the record, find the type, select appropriate layout and then select the record. Seems like that would get me where I want to be.

    –Richard

    December 16, 2022 at 1:09 AM #48493

    Brendan
    Keymaster

    Yup, that’d be the way to do it. Mac only of course, since layouts aren’t on the iOS version.

Viewing 2 reply threads

You must be logged in to reply to this topic.