7 Replies Latest reply on Sep 14, 2016 2:52 PM by D.S.

    I'm really stuck with this portal problem.


      Here goes.


      I'm trying to create a space management database that allows me to enter new users into a directory, which also displays some details (Area Code, User Name, Use Class) in a visual floor plan of each area, as per the graphic below. I have also attached the file.



      It's a mess, but in the blue boxes it should be IS001 and that user, and then IS002 and that respective user, and so on, on this floor plan. Ignore the white boxes. Those blue boxes are portals. The portal table is SPACES, which contains two fields - ID, and AreaCode. The dropdown area code IS001 is SPACES::AreaCode. The two following fields are from SPACES_::UserName, and UseClass, while the values for UserName come from another database.


      I want to be able to designate an area to a new user using either the User Directory or the floor plan under Levels.


      This is what the database relationship manager looks like at present:




      Can anyone help with this - if you solve me this riddle I will seriously send you some booze or something in thanks.




      SpaceMan_DB account: admin, no password.

        • 1. Re: I'm really stuck with this portal problem.

          It would appear that you have one row (blue) portals. In order to control what appears in each, you have three options.


          You can use the sort order for the portal or it's underlying relationship. In which case you can specify the different one row portals to show different initial rows.


          You can use a portal filter to control which records appear in each. So on the first, you might set this filter:

          Spaces::areaCode = "IS001". For the second change the expression to use "IS002" and so forth.


          Thirdly, you can use a different relationship for each and make the arecode field part of the relationship,


          Looks like the 2nd option is the one you can use here and a more flexible approach might put the areacodes for each blue portal into different fields such that you can use this method with more than one floor plan.


          I once used this method to overlay a zip code map with small one row portals that reported the total number of customers over a specified date interval that came from that zipcode.

          • 2. Re: I'm really stuck with this portal problem.

            Second option - so simple, everything fixed. Thanks, Phil. DM on the way.

            • 3. Re: I'm really stuck with this portal problem.

              Also - how do I add a new portal field to Directory... ??

              • 4. Re: I'm really stuck with this portal problem.

                What do you mean by that and why would you want to add it?


                Adding a record (row) to a portal is easy. Adding another field requires going into Manage | Database and adding a field to the table definition. Which is the correct action to take here is critical.

                • 5. Re: I'm really stuck with this portal problem.

                  On the directory I'd like to add the next record, which would be IS004 and the user details - usually when I set the relationship graph to allow creation a blank record in the portal appears - not doing so in this case however. What have I overlooked? Thanks

                  • 6. Re: I'm really stuck with this portal problem.

                    admin with no password fails to open your file. My initial response didn't seem to need a look at your file but I hit that road block now.


                    If your layout is based on Property_Data and your portal lists records from Spaces, then why do you use the cartesian join operator to show all records? The cartesian join is what is keeping the "create" option from working. There are ways around that as the "create" option is often not the best option from a User Interface stand point anyway, but that cartesian join operator ( X ) doesn't look right to me.


                    A script can use a method such as MagicKey to create records in a portal's table. It can also copy a primary key value to a variable, change layouts to a layout based on the portal's table, create the record and set the foreign key field to the value of the variable to link that new record into the current record on your original layout.

                    1 of 1 people found this helpful
                    • 7. Re: I'm really stuck with this portal problem.

                      thanks Phil, will have a look into MagicKey.