4 Replies Latest reply on Aug 13, 2013 2:41 PM by paul350passaic

    Saved and Delete Portal Row to another Portal Row or Notes field

    paul350passaic

      Title

      Saved and Delete Portal Row to another Portal Row or Notes field

      Post

           Hi All,

           Is there a way for portal rows be saved on a different field like notes field before deleting it? the delete script I used came from a starter solution and I was hoping I can edit it to save the data in portal row to another portal row or notes field before deleting it. Reason for such is that Im using the portal row for inputing hourly activity and I was hoping that if the said portal row has been tag or marked as paid, the delete button will save and delete instead of just delete.

           Heres the Screenshot of the database. as you can see the right side of the portal rows has "x" for delete and I was hoping that on the left of the portal field I can put a radio button, check box or drop down menu to mark/tag it as paid. So if its marked as paid, and the delete "x" is clicked, it will save the row to a different notes field and will be deleted.

      Screen_Shot_2013-08-13_at_10.16.36_AM.png

        • 1. Re: Saved and Delete Portal Row to another Portal Row or Notes field
          philmodjunk

               That certainly can be done, but I don't see a reason for doing so. If you want the record to drop out of the portal but still have the data available, just change a value in a field so that the record no longer meets a portal filter's criteria or that is a match field in the relationship. Then the record is still in the table and can be retrieved, but no longer appears in your portal.

          • 2. Re: Saved and Delete Portal Row to another Portal Row or Notes field
            paul350passaic

                 Hi Phil,

                 Im not sure if that will work for my intention of saving all tagged "paid" portal row and save it on a different field notes or another portal row for all the paid portal row. Reason for such is that I want the user to be able to review all the saved and deleted paid portal row if need. But can you elaborate more on how to go about changing a value to a field and not meeting the portal filter criteria

                 as always.. Thanks!

            • 3. Re: Saved and Delete Portal Row to another Portal Row or Notes field
              philmodjunk

                   The need to review and possibly even to reverse (to correct an error) such entries is precisely why I suggest that you keep the data in the same table, but change the value in a field in order to change its "status".

                   Let's say that you have this relationship:

                   Invoices::__pkInvoiceID = LineItems::_fkInvoiceID

                   where you place a portal to LineItems on your invoices layout to create and list all unpaid line items. Then define a number field, paid in line items and give the portal this portal filter expression: Not LineItems::Paid.

                   Now the portal will only display lineitems with a matching invoice id where Paid is empty or zero.

                   Put a button in the portal row to perform this script:

                   Set Field [LineItems::Paid ; True ]
                   Refresh Window[]

                   And clicking the button will cause the item to disappear from the portal, but the record is still in line items so that there is any number of ways you can bring it up for review or even to return it to unpaid status. One method would be a second portal where the portal filter is reversed: LineItems::Paid.

              • 4. Re: Saved and Delete Portal Row to another Portal Row or Notes field
                paul350passaic

                     Hi Phil,

                     This worked fine for us. It took a while for me to understand what to do as Iam a new filemaker pro user. 

                     As always. Thanks a lot!