mleiser Posted June 30, 2009 Posted June 30, 2009 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?
bcooney Posted June 30, 2009 Posted June 30, 2009 Talking in hypotheticals sometimes leads down the wrong path. Could you use real-data examples, bcs you'll get much better advice.
mr_vodka Posted June 30, 2009 Posted June 30, 2009 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.
Recommended Posts
This topic is 5624 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now