Update main table Date field from related Portal Row

Discussion created by SONICARC on Jun 10, 2016
Latest reply on Jun 10, 2016 by SONICARC



I have a layout with a few Customer details and a Payments portal to log customer payments from a related Payments table.


in the portal, a creation timestamp is auto-entered and the user can choose a Payment Type form a popover field that holds a few choices from a value list. The amount received is entered in another field in the portal row.


The Customers table has a Membership Date field that needs to be automatically calculated if the user selects “Annual Membership” from the Type field in the Payment Portal row. The Customer Date Field will get its Date value from the portal row Timestamp (GetAsDate).


So, something like...


CustomerTable Date Field = GetAsDate ( PaymentsTable:: creationTimestamp) only if the PaymentsTable::PaymentType  selection =  “Annual Membership”.


I set a field in the payments table to test extracting the date from the payment timestamp, but I’m stumped on how to get that date over to a Membership Start Date in the Customers Table from the portal row.


Do I need an onObjectExit / Save script trigger for theType field to grab the portal row timestamp date or is there a better way?


it maybe a relationship issue going back from the payments table to the customers table - I’m not sure and / or I’m just not proficient enough with the logic and necessary calculations.


Any advice  / a solution is appreciated.