11 Replies Latest reply on Aug 4, 2014 10:03 AM by philmodjunk

    Having a Problem with Case Function

    MikeProcopio

      Title

      Having a Problem with Case Function

      Post

        I have a portal in my solution on the Dashboard page. I have different layouts that I would like to go to different layouts depending on what is in the status field in the record. In the Full Name field I turned that into a button. I set it to Go To Related Record.....  I set the layout by Calculation using this Calculation. Case ( Main::Status="Draft" ; "NBA Draft" ) When I clicked on the field it wouldn't open a new layout. Any ides?

      Screenshot_2014-08-03_10.42.33.png

        • 1. Re: Having a Problem with Case Function
          MikeProcopio
          /files/1774e43285/Screenshot_2014-08-03_10.45.56.png 2560x1600
          • 2. Re: Having a Problem with Case Function
            MikeProcopio
            /files/810aa730b1/Screenshot_2014-08-03_10.46.55.png 2560x1600
            • 3. Re: Having a Problem with Case Function
              MikeProcopio
              /files/a4122cc506/Screenshot_2014-08-03_10.46.55.png 2560x1600
              • 4. Re: Having a Problem with Case Function
                philmodjunk

                     Interesting. Didn't even know that you could select that option. Is the specified layout one that is based on an occurrence of the table you selected in the GTRR step? Is the name specified exactly correctly?

                     What if you set it up in two steps, use GTRR to pull up the found set and open the new window and then follow it with a go to layout step that uses the layout name by calculation option? If that works, the issue may lie with using this option in the GTRR step. If not, it helps isolate whether it's the GTRR or the case function calculation that has a problem.

                • 5. Re: Having a Problem with Case Function
                  MikeProcopio

                       I could have sworn that you helped me with this issue before. On one solution that i have it works perfectly. It navigates to a layout based on a field value. So if the player had Draft in their status it would navigate to that layout and so on and so on. It is strange that it works fine in one solution and now I try the exact same thing and now it doesn't work on the other solution.

                       I'm thinking it has to do with the relationship for some reason.

                  • 6. Re: Having a Problem with Case Function
                    MikeProcopio

                         My relationship that I set up was pretty simple. To make a dashboard I set the tables up based on a field I call Planet to = each other. Every new record that is created based on a script automatically sets up the players to be from planet Earth. It is the same way I created the dashboard on my other creation and that works fine.

                         The main table is called Main. I connect Main and Dashboard tables based on the planet field. In the Dashboard I have a portal setup to list players based on ranking. The players listed have different status's. Based on the status I have a different layout for each one. I set the Goto Related record function to pull from the Main table and I based the layout on calculation. put the Case function in just like I did on my other solution, but when I click on the name the window opens but it is still on the same layout.

                    • 7. Re: Having a Problem with Case Function
                      philmodjunk

                           What happens if you click the "show only related records" option?

                      • 8. Re: Having a Problem with Case Function
                        MikeProcopio

                             I tried that, same thing. It doesn't navigate. The only time that has happened in the past is if I didn't set it to the right table, but in this case I did that and made sure of it. Very strange

                        • 9. Re: Having a Problem with Case Function
                          philmodjunk

                               If GTRR is doing nothing and no error message is popping up, best guess is that there are NO related records to go to. In other words, there is no record in Main where the value of the "Earth" field matches to the value of "Earth" in current record in Dashboard.

                               BTW, I'd use this relationship instead of a "planet earth" method for matching to all records in most cases:

                               Dashboard::anyfield X Main::anyField

                               As long as you have at least one record in both tables, this will match the current record of DashBoard to all records of Main.

                          • 10. Re: Having a Problem with Case Function
                            MikeProcopio

                                 It is strange, I double and triple checked and everything matches up. I just have a planet field that I put the word Earth in and the records show up in the dashboard layout. It seems to work on that end. The Case Function is set up where in Status if it has Draft as a value then the user is navigated to the NBA Draft Layout, if it says NBA then the NBA, etc etc.

                                 It worked perfectly with the same set up on the other solution. I even tried it on another layout to do the same thing and worked like a charm.

                                 I think I made a small mistake somewhere, but haven't been able to locate it yet. Everything seems to be fine but I'll keep searching

                            • 11. Re: Having a Problem with Case Function
                              philmodjunk

                                   Could you have incorrectly typed in the name of the layout inside the "layout name by calculation" option? A single letter wrong is all it would take...