getDBField Syntax

Sort:
You are not authorized to post a reply.
Author
Messages
Garry Ferwerda
Basic Member
Posts: 20
Basic Member
    Hi:   Maybe someone can tell what I am doing wrong with this statement written against the GLMASTER table:

    user.isMemberOf('RSS-SHOPPING-IT') && trim(getDBField('GLACCMXVAL','MX-VALUE',getDBField('GLCHARTDTL','OBJ-ID',table.CHART_NAME,table.ACCOUNT,table.SUB_ACCOUNT),'RSS-ACCOUNT')) == 'Y'

    I am trying to limit access to accounts based on an attribute value.  I have tried numerous combinations of trim, lztrim and no matter what I have tried no acccounts are ever accessible.

    Thanks,
    John Henley
    Senior Member
    Posts: 3348
    Senior Member
      I do have some examples of how to do this (and I do feel your pain), and will post them next week.
      Thanks for using the LawsonGuru.com forums!
      John
      Garry Ferwerda
      Basic Member
      Posts: 20
      Basic Member
        Thanks John. I did figure out what the problem was. I needed to specifiy the index to use when accessing the GLCHARTDTL table. Here is the working version:

        user.isMemberOf('RSS-SHOPPING') && trim(getDBField('GLACCMXVAL','MX-VALUE',getDBFieldByIdx('GLCHARTDTL','OBJ-ID','GDTSET2',table.CHART_NAME,table.ACCOUNT,table.SUB_ACCOUNT),'RSS-ACCOUNT'))== 'Y'

        I am not trying to understand how the isElementGrpAccessible works.
        Garry Ferwerda
        Basic Member
        Posts: 20
        Basic Member
          Typo in previous post.

          meant to say I am now trying to understand how the isElementGrpAccessible works.
          You are not authorized to post a reply.