Sounds like you need to refresh the window, possibly with the "flush cached join results" parameter.
Try using a Refresh Window script step as the last step of your script to delete the portal row.
I included "flush cashed join results" in the Refresh window step and it did not work.
I have these 4 portal fields:
Appropriately, Members::PaidYear shows 2012.
If I delete the portal row showing 2012, instead of getting the desired 2011, it continues to show 2012. I am stumped.
How is this field defined?
Both fields were TEXT. So, I redfined them as numeric. No change.
Yes, but how does that text field get its value from the portal? (there are several options possible.)
I'd probably do this with a calculation field set to return Number as its type:
Last ( portalTable:: Year )
To return the value from the most recently entered record shown in the portal.
I used Set field in the portal to assign the portal field value to the YearPaid value in Members. It works great and it is not the problem.
The problem is that AFTER the value (ie 2011) is entered and copied into the Members::YearPaid, when I delete the 2011 portal row, the value in Members::YearPaid continues to show 2011. It SHOULD show the the row immediately above 2011 (ie, 2010). Am I being clear?
I think the genesis of the solution is this:
Considering that the portal Dues::PaidYear is sorted in an ascending manner...
therefore any row deletion should 'send' the highest value (ie, last row value) of Dues::PaidYear to Members::PaidYear
I suppose I could freeze the screen... delete the row... goto a Dues layout... sort on the PaidYear column and then pickup the highest value... put it into a Global Variable and then send that variable to the Members::PaidYear field .. whew...but...
... it seems like there should be a simpler, FM way??? (I tried setting the Members::PaidYear to be the Max(Dues::PaidYear but it didn't work as desired)
GOT IT TO WORK!
Here is the gensis of the 'fix'.
Duplicating the Dues::YearPaid field above the portal caused the top portal field Dues::YearPaid to always show in the 'out of the portal' Dues::YearPaid. If the user deleted a row, the wrong value would show.
So, I sorted the portal in DESCENDING order based on the Dues::YearPaid field. This means that the 'top' value is always the most current year. But, this solution wouldn't refresh the Dues::YearPaid portal field even with a script trigger 'on exit' mandating a 'refresh'. So, I created a 'tiny' layout called GOTO that, from the OnExit Script Trigger I would jump to and return from. This caused a resorting of the column and the correct top value to show.
Not very elegent. And I still don't know why FM won't allow the scripting 'refresh' to work????
Thanks to all who contributed. Hope this 'turns on' a light for someone else.