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

Insert Portal Record Script Step


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

Recommended Posts

Posted

Guys,

is there a script step to insert a record into a portal?

Here's what I want to do:

When one person clicks on an item in a portal on the right, that item should be inserted into the portal on the left. (There are two portals to two different files on my layout)

Any ideas?

Posted

Hi,

Portal at left side = Relation 1 = Main.fp5 to Related1.fp5

Portal at right side = Relation 2 = Main.fp5 to Related2.fp5

In Related1.fp5, add a global field g_Record_ID1

In Related2.fp5, add a global field g_Record_ID2

In the Main File, add a global field g_Record_IDMain

Create 2 Constant relationships

- from Main.fp5 toRelated1.fp5 = Constant1

- from Main.fp5 to Related2.fp5 = Constant2

Create 3 scripts :

- In Related1.fp5

Script1

SetField(g_Record_ID1, Record_ID)

- In Related2.fp5

Script2

New Record

SetField(Record_ID, Constant2::g_Record_ID)

- In Main.fp5

Go to related record (Relation1 -show only)

Perform External Script (Script1)

Set Field (g_Record_IDMain,Constant1::g_Record_ID)

PerformExternal Script (Related2.fp5, Script2)

Refresh.

Now, you would create a relationship from Related2.fp5 to Related1.fp5 with this structure Record_ID2::Record_ID1 and makes the additional fields in Related 2 be auto-filled by a lookup from this relationship.

Posted

Kickass, Ugo!!!

I will try that. In my previous thread about the sortkey, I edited my post and attached my latest attempt. Would you mind taking a look at it? The sort seems to work, but it doesn't sort alphabetically...

Thanks!!!

This topic is 7846 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.