• Form Section Security when using Departments

    By Daz Oliver 2 decades ago

    Hi,

    I have found a bug which occurs when trying to add Form Section Security when the Departments option is selected.



    I can see and manipulate the Form Section Security dialog box with no issues, but on pressing OK I get the following error:



    Error in BuildSectionControlSubform()

    184 Variant does not contain a container at line 65



    Looking through the code I found this:

    Case "3"

                    DeptSpecific = Evaluate ({@DBLookup(&quot;&quot;; @DBName; &quot;LURef&quot;;&quot;} &amp; Editors(i1) &amp; {&quot;; &quot;a_DeptSpecific&quot;)})             <br/>
                    DeptKey = Evaluate ({@DBLookup(&quot;&quot;; @DBName; &quot;LURef&quot;;&quot;} &amp; Editors(i1) &amp; {&quot;; &quot;a_DeptKey&quot;)})<br/>
                    QenosRoleName = Evaluate ({@DBLookup(&quot;&quot;; @DBName; &quot;LURef&quot;;&quot;} &amp; Editors(i1) &amp; {&quot;; &quot;a_Formula&quot;)})<br/>
                    If DeptSpecific(0) = &quot;1&quot; Then<br/>
                        Let formula = |@Text(@DBLookup(&quot;&quot;; @Subset(@DBName; 1) : &quot;applications/QEN00052.nsf&quot;; &quot;(Lookup ApplicationDepartmentRole)&quot;; @DBTitle + | + DeptKey(0) + | + &quot;| + QenosRoleName(0) + |&quot;; 2))| 'returns all department specific usernames for the specified Qenos Directory Role<br/>
                    Else<br/>
                        Let formula = |@if(@IsMember(@DBLookup(&quot;&quot;; @DBName; &quot;LURef&quot;; &quot;| &amp; Editors(i1) &amp; |&quot;; &quot;a_Role&quot;); UserAppRoles);@UserName; &quot;&quot;)|<br/>
                    End If<br/>
                    stream.writeText formula(0)  ,0<br/>
    



    It is failing on the last line (stream.writeText …) because formula is just set to a String and not an array - I'm not sure if formula should be Eval'ed first.



    Also, because it is Department Specific it is looking up a database at "applications/QEN00052.nsf" which I'm not sure if it's meant to do?



    Cheers

    Darren

    • fix

      By Mark Demicoli 2 decades ago

      Thanks Daz, this will be fixed in the next release.



      -Mark