I have a problem with getting the latest values from my portal to a global field.
I have a tables:
In Rented Products table, I have created a portal from Join Table relationship. In this portal, I'm entering dates, customer names (from value list based on customer table) - as the product goes to the different customer based on dates.
In ist view based on Rented Products Table I want to see all my products and last customer for each specific product. I sort the portal with Start date so it moves the latest customer to the top.
List view shows only first value which has been entered to the portal, so I have created a global filed in Rented products table, and another text field to store those global results (last customer) for each Rented product, so then I have the correct results. I'm using ST OnObjectExit to get first portal row values into my global filed.
But I have a problem with refreshing the portal.
When I edit current values it works fine - for example, I need to correct dates, portal sorts values (using start Stard date field), and I get my global filed with a correct value.
When I'm entering a new record in a portal - after exit, the portal is sorting records but does not set correctly first portal row to global filed (just last was which was on top). It seems like the script does not see new record until it gets sorted - with the current records there's no problem.
ST OnObjectExit :
Refresh Portal:"My portal"
Go to object:"My portal"
Go to portal Row [Select Off, First]
Set field: global; customer filed.
Set field: Text filed; global filed.
Any Ideas how to solve this ??
I appreciate any help.