June 2, 200322 yr 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?
June 2, 200322 yr 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.
June 2, 200322 yr Author 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!!!
Create an account or sign in to comment