4 Replies Latest reply on Jun 14, 2013 10:51 AM by Shauniedarko

    Showing Related Records in a Portal

    Shauniedarko

      Howdy

       

      I'm fairly certain that what I'm attempting to do likely isn't possible, but I'm hoping maybe some of you awesome folk might be able to point me in the right direction.

       

      I've created a hierarchical list view for my users to view their projects at a glance. It's got multiple levels (Device Family, Device Type, Device Generation, Project, Project Description) that allow the users to view their projects easily and navigate to them if desired. I set this up in a portal using a technique based on a solution I found a couple of years ago (I wish I could find the name!) that basically gathers the data to be displayed, stores it in a global variable, and then you create a table that looks up the variable and places each item from the variable into a field (which is a simplified and likely not very good explanation).

       

      Anyway, so I've got this hierarchical/expanding list that works great. When it gets down to the actual project level, it shows color indicators based on the status of the project, etc. What I can't figure out how to show are the project's colors. The relationship base table is a Project table. The colors are stored in a related ProjectVariations table. The colors are container fields with small images containing an image of the color. Since nesting portals isn't an option, and I can't create a list of container fields (well, I can, but it would just give me a list of the filenames), I'm not sure how to get this done or if it's even possible to do it.

       

      I'd considered using a repeating field, but you can't store images in a variable, and relationships between repeating fields don't work. It'd be nice if I could set up two repeating fields and have each repetition only relate to its corresponding repetition...but that's not happening. I have a feeling repeating fields are a dead end. Every search I did on repeating fields brought up, as the first answer, "Why are you using repeating fields? They stink!" so I doubt they're the way to go.

       

      I'm attaching a couple of screen shots. I can't attach the file because it's got some proprietary info that my boss would kill me for sending across the internet, but the pictures should give you a good idea.

       

      Thanks in advance!

       

      Shaun

       

      IDEAL1.pngIdeal2.pngIdeal3.png

        • 1. Re: Showing Related Records in a Portal
          BruceRobertson

          "I'd considered using a repeating field, but you can't store images in a variable..."

           

          Not true.

          • 2. Re: Showing Related Records in a Portal
            Shauniedarko

            I'm sorry.  That should be amended to say that I can't store images in a variable the way I'm designing.  The method I'm using to gather my data is using ExecuteSQL to gather a list of all the items I need.  Then I loop through and set a global variable.  A calculation field is set to look at that global variable and pull out the correct data.  ExecuteSQL only returns text and won't return the image.  So if I pull the images using ExecuteSQL, it'll only return the filenames.

             

            I could gather the images by opening a new window, searching for the related files, and then looping through them and setting each image to a variable, but I'm trying to avoid that.  My goal is to have this hierarchy view be as quick as is possible. 

            • 3. Re: Showing Related Records in a Portal
              Stephen Huston

              This sounds like a classic way to use Custom Formatting, calculating the status and assigning text or background colors to the object based on that.

               

              This allowed me to dump all of the stored background color images we had calculated for a status list we had been using for nearly a decade.

              • 4. Re: Showing Related Records in a Portal
                Shauniedarko

                That's how I've set up the status dots that you can see in the sample image, but the colors of the project are the different color we're offering the product in.  Sometimes that means the color sample will be multi-colored or striped or something like that.  If they were just sticking to single-color samples, that would make my life so much easier