Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5624 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

Talking in hypotheticals sometimes leads down the wrong path. Could you use real-data examples, bcs you'll get much better advice.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.