PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 08/23/2016 11:25 AM by  giesewendy
LPL to default a value
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
giesewendy
HRIS Analyst
Private
Advanced Member
(55 points)
Advanced Member
Posts:27


Send Message:

--
08/23/2016 10:10 AM

    I want to place a default into several fields on some of our forms.  Does anyone have basic LPL code for that?

     

    Woozy
    Private
    Private
    Veteran Member
    (3469 points)
    Veteran Member
    Posts:701


    Send Message:

    --
    08/23/2016 10:57 AM
    Hi giesewendy,

    Just to be clear, there is a difference between "Default" and "Initial Value".  Default means that every record is automatically assigned this value unless it is overridden and if you delete the override value then the default value will be assigned.  Initial Value is the value that is populated into the form when you create a "new" record - but that value would not be assigned automatically to any other records.

    I don't believe it is possible to assign a true "Default" value to a delivered business class field, although you can do this to a custom UserField.  It has to be done a the field level rather than the form level.

    You can assign an Initial Value for a field at the form level OR (for custom UserFields) the field level.   Here is a sample of how this is done at the form level for a "constant" value:

    LRCJobContextForm is a Form
        title is "JobContextForm"
        Layout
            three column
                effective date
                Job
                    display as text
                ShortDescription
                    initial value is "KMTesting"
            paragraph
                Description

     

    You can also have it use existing related field name value by replacing the "KMTesting" with the related fieldname.

    I hope this helps!

    Kelly

    Kelly Meade
    J. R. Simplot Company
    Boise, ID
    giesewendy
    HRIS Analyst
    Private
    Advanced Member
    (55 points)
    Advanced Member
    Posts:27


    Send Message:

    --
    08/23/2016 11:25 AM
    thank you
    You are not authorized to post a reply.