5 Replies Latest reply on Aug 16, 2013 11:13 AM by philmodjunk

    Adding fields from a previous record in a portal!

    DranLang

      Title

      Adding fields from a previous record in a portal!

      Post

           Hi everyone!  I have a layout that has 3 fields (ID NUMBER, NO. OF HRS, TOTAL HRS.) in a portal.  The ID NUMBER field is a drop down list, where I can choose the id number of my employees.  The NO. OF HRS. will contain the no of hours they worked for the day and the TOTAL HRS. will contain the total numbers of hours worked.   This is how it works, I will fill in the corresponding values for each field for the day and I will do the same thing the following day, but how can I add the number of hours worked from the previous day to the current day for the same ID number?

           Thank you everyone, any help is greatly appreciated!

        • 1. Re: Adding fields from a previous record in a portal!
          philmodjunk

               Define total hrs as a summary field to compute the total fo No> of Hrs. Select the running total option for it.

          • 2. Re: Adding fields from a previous record in a portal!
            DranLang

                 I tried this one before, I forgot to say that I will click a (add) button and it will refresh the portal so it will be empty.  The records are tied together by their EmpID and Day_Number.  So for day 1 I will only have 1 record of number of hours for 1 employee and on day 2 I will have another record for the same employee but will have different value for numbers of hours depending on how long they work for that day.  I tried to use the IF statement but I can't seem to finish it to work properly.  Is there another way I can do this?

                  

            • 3. Re: Adding fields from a previous record in a portal!
              philmodjunk

                   Yes that does make a difference. I assumed you had a portal for all of the records you wanted to see totalled. Using a portal does not seem to make sense here. Seems like you are getting only one record in the portal where portals are normally used so that you can see and work with multiple portals except for very special cases. And this does not seem to be such a special case.

                   Or am I missing additional details about your design?

              • 4. Re: Adding fields from a previous record in a portal!
                DranLang

                     The portal is a small part of the design which is for reporting purposes only done everyday at the end of each work hours.  I added an additional field which I called Yesterday so now I have 4 fields (ID NUMBER, NO. OF HRS., YESTERDAY, and TOTAL HRS).  The ID NUMBER contains the employee ids and is a dropdown list, if I choose the employee id of a personnel the YESTERDAY field will show the total number of hours he worked yesterday and it will be added to the NO. OF HRS. he worked for today.  Then early morning the following day I will click a button to create a new report, which will clear out the fields in the portal so I can create another report for that day.

                      

                • 5. Re: Adding fields from a previous record in a portal!
                  philmodjunk

                       This does not explain why you are using a portal. Unless you are making special use of portal filtering, if there is only one record in your portal at any given time, there is no need for the portal.

                       

                            which will clear out the fields in the portal so I can create another report for that day.

                       Is that: a) deleting the record from the portal's table, b) clearing the fields by deleting the data in those fields or c) Changing a match field so that the related record no longer appears in the portal?