4 Replies Latest reply on Jun 18, 2012 9:29 AM by philmodjunk

    Moving One Record to Another Layout

    ShanaEichleberger

      Title

      Moving One Record to Another Layout

      Post

      I have a layout called Personnal which has all of the employee that we currently have. In another layout called Daily Reports I have a value list that assess its values from Personnal::Employee Names. What I need to do is that when an employee is let go their name does not show up in the value list anymore. 

       

      Is there a way to either have a If or Case statement associated with the value list that only shows "current" employee or is there a way to move the record from the Personnal into a new layout for the past employee. 

       

        • 1. Re: Moving One Record to Another Layout
          GuyStevens

          I would create a new field in the Personnel table. Something to the nature of "status" where you could set a status for each personell member; The standard value "Auto Enter Data" would be "Active" but their would be a dropdown where you could choose "Active, Inactive"

          Then in the table the Daily Reports layout is based on you create a text field called g_Active and make sure you set it's storage to global.

          Give it the value "Active" And that value will show up in this field on every record.

          create a new table occurrence of the Personell table (the two green plus signs) and call it Personnel_Active

          Relate it to the Daily Reports table in the following way:

          Personnell_Active::Id-----[=]-----DailyReports::PersonnelIdFk    -   FK Stands for Foreign key
          Personnell_Active::g_Active-----[=]-----DailyReports::Status

          This way you'll only be able to see active personnell from your Daily reports table.

          Make sure you base your value list on the Personell_Active TO (Table Occurence) and select the "Show only related values from - DailyReports"

          This should give you only the active personell in the dropdown.

          If you have any problems let me know.

          • 2. Re: Moving One Record to Another Layout
            philmodjunk

            Another option is to set up a calculation field in the employee table:

            If ( Status = "Active" ; Prsonnel::ID )

            Then base your value list's values on this field instead of the ID field.

            • 3. Re: Moving One Record to Another Layout
              GuyStevens

              Damn, that's far more clever.

              And elegant as well. Embarassed

              • 4. Re: Moving One Record to Another Layout
                philmodjunk

                But less flexible than a relationship based conditional value list, so you have to consider both the pros and cons. That's why I came up with this tutorial on conditional value lists:

                Custom Value List?