awayand Posted June 2, 2003 Posted June 2, 2003 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?
Ugo DI LUCA Posted June 2, 2003 Posted June 2, 2003 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.
awayand Posted June 2, 2003 Author Posted June 2, 2003 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!!!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now