Form Function Codes in GEN or LDAP?

 2 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Randall
Veteran Member
Posts: 44
Veteran Member
    Hi all,

    I haven't found much information on this subject.  However, I've found a table in the GEN database called VALLSTUSE that lists function codes and their translated values for each program in a productline.  However, the table lists ALL function codes, even those at the line level.  There doesn't appear to be a unique identifier for which function codes are for the form and which are for objects of the form.

    What I'm trying to accomplish...

    I've written a C# program that will go through the LDAP, find the security roles, classes, rules, and all actions associated with those rules for LASE security audit purposes.  However, the function codes listed are in one letter format (I, N, P, etc.).  There are some instances where function codes have multiple meaning depending on the form.  For example: R means Release, Create Detail, Req Deduct Create.  There are a couple of other examples.  However, instead of listing the one letter abbreviation, we've been trying to translate the value.

    If you take a look at LSA, and go to possible actions for a form, everything is translated, and you can check function codes accordingly.  So, it appears it can be done.  I wouldn't think it would be hardcoded into the LSA tool.  I didn't know if it was actually stored in LDAP, which I haven't been able to find... yet (if possible), and haven't been able to successfully figure out the VALLSTUSE table.

    If anyone has run across this or might have any insights, I would greatly appreciate it.

    Thanks,
    Randall
    Norm
    Veteran Member
    Posts: 40
    Veteran Member
      This information is not always possible to get at because there's no 'law' that says that each of the form function codes has to have an english language translation. One place you could look is in the .scr files for each form. In most cases, the valid functions codes along with their translations are found in the $EDITS section of the screen definition for each form.

      For example, here's a fragment from RQ10.1

      FC I +=(+)PageDown
      -=(-)PageUp
      A=Add
      C=Change
      D=Delete
      I=Inquire
      N=Next
      P=Previous
      R=Release

      Though not trivial, it's certainly possible to use perl to sweep through all of the .scr files and pull this information out. Fortunately, the rigid nature of the .scr files makes this doable.

      Alternately, if you look at the generated .xml file after a compile, the translated values appear to be there as well. I've never had an occasion to tackle sweeping through those in a script, but it may be easier then the other option I mentioned.

      I do know that those translations don't consistently exist anywhere in GEN, I went through every one of those tables mining information.

      Good luck
      Randall
      Veteran Member
      Posts: 44
      Veteran Member
        Hey Norm, thanks for the response.

        I ended up doing something similar to get around this issue. Originally, I created an SSO component in the .NET program that would "log on" to Portal and then retrieve the form XML file for each program listed in the SCREEN table in the GEN database. This worked pretty well for our development server, but when moved into testing where security had things locked down, the username that it was using for the SSO component had some forms restricted and therefore couldn't retrieve the function codes.

        I took another route by FTPing to the server and going to the $LAWDIR/*prodline* /map/default/ directory to retrieve the XML file. After I downloaded it and saved it to memory, I could parse out the function codes and their translations. After getting that piece to work, it works like a charm.

        Randall