Lawson Pattern Language (LPL) Reference?

Sort:
You are not authorized to post a reply.
Author
Messages
Woozy
Veteran Member
Posts: 709
Veteran Member
    Hi Everyone,

    I'm wondering if any of you folks in LandmarkLand have any reference documents or hint sheets relating to Lawson Pattern Language (LPL) code that you would be willing (and able) to share?

    As we are proceeding with our upgrade to LRMK/TM 10, we have a number of customizations from TM 3.4.2 that we are going to replace with configuration console mods.  Most of these changes are straightforward label changes, etc, but we also have a number of Actions where we want to add data validation to the form, but we can't figure out how they need to be written.

    For example:

    On a Termination, we want to add a constraint similar to this:

     ((EffectiveDate = TermiantionDate) and (EffectiveDate  < (CurrentDate - 90 days)))

    Also on Termination, we want to force the "Deceased" flag to true if the ReasonCode = "DEATH"

    It seems like both of these should be possible, but we can't make them work.

    I'd appreciate any reference sheets or materials that you can (legally) provide me.  If you have Lawson documents that you can't send me, but which have document numbers or something I can request from IGS, I'd sure appreciate it.

    Thanks Much!

    Kelly Meade
    J. R. Simplot Company
    Boise, ID
    Peter O
    Veteran Member
    Posts: 69
    Veteran Member
      Hi Woozy, we had a similar requirement for our termination form.
      For the termination date and effective date, here's what I did:
      -Hide termination OR effective date (we hid Termination date)
      -in config console LPL:
      "
      TerminationDate
      initial value is effective date
      "
      This way when the user enters the effective date, the Term date is autopopulated, and since effective date and Term date are redundant in this usage, it's better to just hide one of the fields.

      We then re-labeled the effective date field to be more self-explanatory ("Termination Effective Date" or something similar):
      "
      effective date
      label is untranslatable:"Termination Effective Date"
      "
      As for forcing the deceased flag to be true,
      you'd handle that with the IPA flow AFTER you submit the form.
      You'd just check the reason code, perform a landmark transaction and "update" the business class where you store the deceased flag.

      Please let me know if you want more info.

      Thanks!
      Peter

      Peter O
      Veteran Member
      Posts: 69
      Veteran Member

        My apologies, let me clarify something about the effective date and the 90 day restriction.

        Create a new "compute field" i named mine TestDate. Set it to be a date field type. in the computation box the field's computation should be " (current date + 90) "

        This will create a field with this LPL:

        [EDIT: below I changed "current date" to "system current date". In order to compare with effective date, you need to ensure that TestDate is the same TYPE of Date as effective date. "system current date" returns the same type as effective date. I also added "days" after "90", the reason for this is that 90 is a number, but needs to be typecast to a Date context.]

        The below works fine on all 10.x versions I've tested on (10.0.x & 10.1.1.x).

        Employee is a BusinessClass
            owned by hr
        
            Derived Fields
        
                TestDate is a ComputeField
                    type is Date
                    default label is untranslatable:"TestDate"
                    ((system current date + 90 days))
        

         You would then hide the TestDate field on your form somewhere. It does show 90 days out.

         

        You would then put a constraint on your effective date for less than "TestDate"

         

        Looks like so:

        effective date label is untranslatable:"Termination Effective Date"
        constraint (effective date <= TestDate)
        "TerminationDateMustBeLessThan90DaysOut"
        required

         

        My initial post neglected to handle the weird way that you need a compute field for many types of computations, especially date ones...

         

        You are not authorized to post a reply.