AnsweredAssumed Answered

Portal Manipulation / Adding

Question asked by SeanKooner on Jul 28, 2014
Latest reply on Jul 29, 2014 by philmodjunk

Title

Portal Manipulation / Adding & Extracting Information

Post

     Hello,

     I am currently working with a portal on my existing layout. My goal is to add / remove data from the portal via radio buttons. I attempted using scripts but I'm having no luck with the "NO" script- it ends up freezing (Well works but hangs for a minute or two), but I'm just wondering if I'm using the most effective method.

     Example:

Option A  -   O YES    O NO
Option B  -   O YES    O NO
Option C  -   O YES    O NO

If NO is selected for option A, it will scan for "Option A" and remove it from my portal.

     Go to Object [Object Name: "MyPortal"]
     Go to Portal Row [Select; Last]
     Set Variable [$$PortalCount; Value:Get (ActivePortalRowNumber)]

     If [MyLayout::OptionA = "NO"]
        Set Variable [$$InnerCount; Value:$$PortalCount]
        Loop
           Go to Object [Object Name: "MyPortal"]
           Go to Portal Row [Select; No Dialog; $$InnerCount]
           If [MyPortal::Name = "Option A"]
              Delete Portal Row [No dialog]
           End If
           Set Variable [$$InnerCount; Value:$$InnerCount - 1]
           Exit Loop If [$InnerCount = 0]
        End Loop
     End If

If YES is selected, it will add "Option A" to my portal

     Go to Object [Object Name: "MyPortal"]
     Go to Portal Row [Select; Last]
     Set Field [MyPortal::Name; "Option A"]
      

Outcomes