6 Replies Latest reply on May 27, 2011 12:49 PM by JosahMower

    Append to Note Field

    JosahMower

      Title

      Append to Note Field

      Post

      I am trying to append data from other fields into one note field.

      I am setting up a DB for inventory and would like to keep track of the history of there the item has been. I will have a button that move the data into a Location history Log field and then clear out the other fields so that the location can be updated.

      fields are:
      building:
      dept
      fname
      lname
      etc.

      The information would them be placed into location history like so:

      ******************************

      Date: (Date Moved)

      Building     (building)
      Department   (dept)
      First name:  (Firstname)
      Lastname:    (Lastname)
      Account User Update: (Username)

      ********************************


      I tried to setup variable but they are not puting the data in the () fields. Every time I hit the button to move it deletes the past information and replaces it with the variable.

      ************************************************

      Appending data to continue to fill

      Building:         $building
      Department:   $dept
      FirstName:      $fname

      ******************************************

      Is this possible?

        • 1. Re: Append to Note Field
          philmodjunk

          It can be done and a look at your script would probably show us  the errors involved pretty quickly, (Perhaps you have your variable name enclosed in quotes here), but if you define a related table and put each entry in a separate record, the resulting set of notes can be listed in a portal for much greater flexibility than trying to append each new note to the existing text in the same field.

          • 2. Re: Append to Note Field
            JosahMower

            This is what I have started. Are you saying to just make a location tbl and referance the tag number instead of keeping it in the table and record?

            Show Custom Dialog [ Title: "Authorize Move"; Message: "Are you sure you would like to change location of the items?"; Buttons: “No”,
            “Yes” ]
            If [ Get (LastMessageChoice) = 3 ]
            Set Variable [ $building; Value:_tblEquip.xlsx_ PO_1100000::building ]
            Set Variable [ $dept; Value:_tblEquip.xlsx_ PO_1100000::department ]
            Set Variable [ $fname; Value:_tblEquip.xlsx_ PO_1100000::firstName ]
            Go to Field [ _tblEquip.xlsx_ PO_1100000::LocationHistoryTest ]
            Insert Text [ “Appending data to continue to fill
            Building: $building
            Department: $dept
            FirstName: $fname
            ******************************************” ]
            [ Select ]
            End If

            This is the output and it is over writen everytime it is run.

            Appending data to continue to fill

            Building:          $building
            Department:   $dept
            FirstName:      $fname

            ******************************************

            • 3. Re: Append to Note Field
              philmodjunk

              Insert Text only inserts literal text, it does not evaluate expressions so the variable names are inserted, not the data stored in them.

              What I am suggesting is that you do not use Insert Text (which doesn't work anyway here, you'd need insert calculated result), that you instead create a new record each time you want to log this information. It's much easier to work with a list of records than it is to try to scroll through a large text field that contains multiple entries.

              • 4. Re: Append to Note Field
                JosahMower

                Ok I see what you are saying. So do I make a static lists of how many times the items moves like building1 building2 building3 ect or can it be dynamically made?

                For instance, I get a new computer in I put in in building HQ and file out the rest of the fields for location. Then 2 weeks from now its going to parts in building tusc file out rest of the information. Then 3 months from now it comes to my office at HQ, I file out information. 3 weeks from then I put in at the managers desk at george st and file out the information.

                But I get a computer in today it gets placed in inventory till it is placed at the receptionist desk for its life.

                Would I need to create the inventory columns listings for 1 2 3 4 5 6 moves in a  or could it make a new entirey for every move?

                How would I go about doing that? I think I understand what you are saying just a little foggy.

                • 5. Re: Append to Note Field
                  philmodjunk

                  I'm assuming this relationship:

                  Inventory::ItemID = Locations::ItemID  

                  as a one to many relationship.

                  I would create a separate record for each location where an item is placed, but include a date field to indicate when it was placed at that location. You can also add a status field with data in this record to show whether or not this record's data represents the "current" location or not. This way you can use finds, sorts, portal filters, etc. to show just the current location of each item, but still be able to show all past locations for it.

                  I wouldn't use columns of data to show past locations, that's way too much work, but I would use a portal based on the above relationship, but sorted by placement date in Descending order to show both current and past locations.

                  • 6. Re: Append to Note Field
                    JosahMower

                    Oh I understand now. And that does seem more logical. Thank you for all your help.