8 Replies Latest reply on Jul 18, 2016 12:17 PM by cillion

    Roompicker

    cillion

      Hi there!

      Im building a solution with a roompicker for courses. Meaning that when registring a new course between a start time/date and end time/date, am going to show all rooms availeble with roomtype="Meetingroom", the availeble rooms will be green and occupied room will be red, and only the green ones is possible to select.

       

      Im thinking doing this with a button and a portal selector, would this be possible?

        • 1. Re: Roompicker
          mikebeargie

          Sure, as long as you either filter the relationship or the portal itself to only show the rooms that are eligible for selection.

           

          Tie the button to grab the ID of the room in the portal row selected, and then go create your "reservation" with that room ID.

          • 2. Re: Roompicker
            schamblee

            Here is a sample database by seedcode.  It's a seating chart , but would be the same concept.  

            Dropbox - AirplaneSeatingDemo.fmp12.zip

            • 3. Re: Roompicker
              cillion

              Cool!

              The room is only occupied if the start timestamp of the new course is in between the previus resevated course on that room. Would you use the Case og Let function for this?

              • 4. Re: Roompicker
                David Moyer

                Even though you're working with solid colors, as opposed to images, the following might still be useful:

                Surrender to Fun, with FileMaker

                It demonstrates the use of a grid of buttons that manipulates the images in said grid.  Instead of images in containers, you'd probably use text fields with Conditional text formatting (fill color).  The script "Click" is probably of most interest to you.

                It uses rows of a repeating field to create the grid.

                 

                (Note that the button grid, an "overlay", is transparent.)

                • 5. Re: Roompicker
                  mikebeargie

                  I would use a global field to store my “proposed start time” for the course I am selecting. I would then add a relationship to reservations to get other reservations that “overlap” the globally selected reservation, using the List() function to get a list of the room IDs associated with those overlapping reservations. Then I would filter the portal of rooms by a simple function of the Room ID not being in the overlap list.

                  • 6. Re: Roompicker
                    cillion

                    Okey, I have now a portal that only showing the meetingsrooms as the type. But if I want to show all the meetingsroms if they are availeble or not, just with different formatting, would that be possible?

                    Do you mean using that global variable as a parameter for the List function ?

                    • 7. Re: Roompicker
                      mikebeargie

                      Just take the filter calculation from the filter in the portal, and put it into conditional formatting instead.

                      • 8. Re: Roompicker
                        cillion

                        okey thanks, but I cant do a list function in the conditional formatting.

                        This is my portal filter now:

                         

                        kurs_ROM::Romkategori  ≠ "Overnattingsrom"

                         

                        How do I make a list with both occupied and not occupied?