2 Replies Latest reply on Apr 6, 2012 11:02 PM by philmodjunk

    initializing fields



      initializing fields


      is there a way to initialize multiple fields in one calculation? i have several fields in a record i want set when the record is created. the values change depending on what layout was used to create the record.

      the only way i see is to use a Case statement with Get(LayoutName) tests  and cut and paste it into each fields initialvalue calc.

      is there a better way?

        • 1. Re: initializing fields

          i figured out a fairly straight forward way. i use script triggers to set global variables that i then use to init the fields. no layout testing, i just have to be sure the globals are reset to defaults after i leave the special layouts.

          • 2. Re: initializing fields

            An alternative approach is to define auto-enter calculations that use Get ( LayoutName ) in a Case function to determine the value to enter into the field when the record is first created.

            You may also be able to just enter a single value into a single field and then the other fields use looked up value settings to copy data from a related table. That single value would be the needed match field that determines which related record supplies the data to the look ups.