June 30, 200916 yr Another problem. Say I have a parent record. I then have a portal with multiple records for children entry. I then have a button that should do the following in a script. Delete all the portal records for this particular parent and then create a number of portal records for this parent. Example: Parent Jones, children Fred and Agnes. Have a screen that shows the parent - Jones - record with all the basic info. Then I have a portal that has two records, one for Fred and one for Agnes. For whatever reason, I want to, with a push of a button in the parent record, delete Fred and Agnes and create children records for Pat and Mike. This is a simplification of what I really need to do. What's the easiest way?
June 30, 200916 yr Talking in hypotheticals sometimes leads down the wrong path. Could you use real-data examples, bcs you'll get much better advice.
June 30, 200916 yr Set Variable [ $p; Get ( ScriptParameter ) ] SEt Variable [ $parent; parent::pkParentID ] If [ not IsEmpty ( child::pkChildID ) ] Go to Related Records [ Show Only Related ] Delete All Records Set Variable [ $k; 1 ] Loop Exit Loop if [ $k > VAlueCount ( $p ) ] New Record Set Field [ child::fkParentID; $parent ] Set Field [ child::name; GetValue ( $p; $k ) ] Set Variable [ $k; $k + 1 ] End Loop Go to layout [Original] Else Show Custom Dialog ["no children"] End If Then send the names as a list via a script parameter.
Create an account or sign in to comment