FM 14 Portal Row Determination

Discussion created by synergy46 on Jan 19, 2016
Latest reply on Jan 21, 2016 by synergy46

I have a membership application.  There is a 'many' portal named DES that holds the member's Status:  Deceased, Demit, Suspended etc....


DES: has two fields:  Type (Deceased, Demit, Suspended) and Date.


The portal sorts onDES::Date descending.


Logically the 'Deceased' type would be the latest date for the portal.


My problem is coming up with some error checking that works.  I need to check if a member has entered, for example,  a Suspended Date of Jan 5, 2016 and then entered a Deceased Date of Dec 22, 2015  (A member can not be suspended after they die).

I have tried setting $Type=DES::Type and $PortalRowNum=get(ActivePortalRow) to capture the row of  the most recent entry.


But, after the Commit, the portal resorts and get(ActivePortalRow) = 0 and of course the Deceased row may be moved somewhere else.  ..... Even if I use it AFTER the Commit.... (Why does commit 'break' any subsequent use of get(ActivePortalRow)?


Everything pretty much works EXCEPT that after the Commit, I need to 'find' the 'Deceased' DES::Type and delete the DES::Date and since the portal rows are changed and get(ActivePortalRow)=0 I can't find (if it exists) the Deceased row....