11 Replies Latest reply on Jan 31, 2016 8:30 AM by synergy46

    FM 14 Adv Portal Row quandry

    synergy46

      I have a Membership application.  The main layout (based on Members) also has a MembersPortal (Members Table) 'navigation' portal showing member names on the left.  (X)

      There is a portal filter that shows the portal names according to the Navigation values in :  Active/Inactive and/or Members/Candidates/Other.

      This works well.

      `FordActiveInactive.png

      The 'Active/Inactive' fields and the Member/Candidate/Other fields  at the top for example run a script that finds  the membership table according to it's selection.  This works.

       

      The problem is that this script, after the FIND, it  sends the Portal Record to the top. 

      ScrActiveMember.png

       

      So, I wrote this script:

      PortalScript.png

       

      The problem with this script is that as I  step through it, it locates the $$KP but isn't able to set the focus on that record?

      (The initial portal choice was Voss, Scott.  The Find/Sort command sent the record pointer to the top (Crocket,David B) then the Loop script located Voss but couldn't 'set' the record to be highlighted; as if I had clicked it.

       

      DoubleSElect.png

       

      Commit Record doesn't do it.  How do I put the record pointer on the indicated record when I fall out of the loop?

      Notice how Voss is 'selected' but the Find put the record pointer of Crocket.... grrrrr... Ideas?  thanks

        • 1. Re: FM 14 Adv Portal Row quandry
          cortical

          if the object is to highlight the portal row that corresponds to the current record (?)

           

          ( not clear how the 'record pointer' works)

           

          define a conditional format on a portal row object along the lines of  portal row rel pk_id = current displayed record pk_id

          if it is true, use the defined CF fill colour), text colour

          • 2. Re: FM 14 Adv Portal Row quandry
            synergy46

            No, the problem is not getting the portal record to be highlighted. 

             

            After the find, (see above) Crocket's record is highlighted; and stays highlighted; despite my loop that finds Voss, Scott record. 

             

            After I find the Voss record the Crocket record stays highlighted.    I want the Voss record to be the current record and to be highlighted.  Instead it stays 'grayed';

             

            I have tried using Commit Record, Refresh Window, $PortalROW=GET(ACTIVEPortalRowNuber) followed by go to PortalRow($PortalRow).... Nothing seems to work....?????

            • 3. Re: FM 14 Adv Portal Row quandry
              cortical

              is it an issue with the default style state?

               

              e.g. pressed, in focus

               

              I keep falling over default black from time to time that I do not expect to see...

              • 4. Re: FM 14 Adv Portal Row quandry
                synergy46

                I don't think it is related to style.

                 

                The bones of the script are:

                 

                ScrActiveMember.png

                followed by:

                PortalScript.png

                 

                Line 97 (Find) causes Crocket's record in the portal to be selected and highlighted and the details of his record to show to the right.  This happens REGARDLESS of what record I MIGHT HAVE PREVIOUSLY SELECTED.  For example, I select Voss record and then when line 97 (Find) is encountered, 'focus' moves from Voss to Crocket.....

                (see below)

                crockett.png

                So, to correct this, I run the script above starting at line 270.  This script finds Voss but Crocket stays selected and the detail to the right of the Navigation portal shows Crockets detail. 

                I Want it to show Voss's record and detail. 

                This is why I use the loop; so that I can start at the bottom of the portal and move up until Voss's $$KP is found.  At this point, Voss is selected with a 'GRAY' highlight but Crocket stays yellow and the detail shows Crocket.  I need Voss to be in yellow (which happens automatically when I click on a name) but it doesn't happen by script????? Thanks for your reply.

                • 5. Re: FM 14 Adv Portal Row quandry
                  cortical

                  try adding a flush cache to the refresh window to see what happens

                  • 6. Re: FM 14 Adv Portal Row quandry
                    synergy46

                    Flush Cache?  Nope.  Same problem.

                    As I step through the script, it is clear that line 97 FIND is causing the record to go to the first record.

                     

                    The amazing thing is that after I use a LOOP to locate the the previously selected record, I CAN NOT 'active' that selected record and have it's detail show on the right.   Crocket's record continues to show no matter what .... grrrrr....

                    • 7. Re: FM 14 Adv Portal Row quandry
                      cortical

                      so what defines the yellow highlight? ( did I miss that?)

                      • 8. Re: FM 14 Adv Portal Row quandry
                        synergy46

                        The yellow highlight is done with conditional formatting.  I don't think it has anything to do with being able to simulate a mouse click on a selected portal record.

                         

                        After I run the script, this is what I see:

                        The Voss record is found via the looping script but I need a way to effectively click on it from a script.  Doing this will show me Voss's details .... and not Crockets.

                        screenshot_608.png

                        • 9. Re: FM 14 Adv Portal Row quandry
                          cortical

                          so what is the CF definition

                           

                           

                          one other thing I have seen multiple times over the last 18 months, is the position of the cf object or field gets porked (maybe stacking order) and moving it out of the portal and back to the same position ( even exactly the same position) will get display correct again. And yes this for things that were working perfectly fine, until some change - a stacking order maybe...

                          • 10. Re: FM 14 Adv Portal Row quandry
                            synergy46

                            Concerning the portal row 'highlighting' it is not a cf but just custom formatting:

                             

                            What makes me think the problem is related to the FIND command is:

                            A)  I can debug it and see what happens when FIND IS ENCOUNTERED.

                            B)  The exact same LOOPING code (not script) is used when a record is I click on a portal record.

                            Clicking on the record does a GTRR and then runs the looping code SUCCESSFULLY.

                             

                            Any more ideas?  I surely appreciate your thoughts.... I am stumped.

                            conditional formatting.png

                            • 11. Re: FM 14 Adv Portal Row quandry
                              synergy46

                              Got it to work!!!

                               

                              What I needed was a GTRR once the portal record was found.

                               

                              gtrr.png