重复的Filemaker记录和相关的门户记录

时间:2019-03-15 00:35:00

标签: database filemaker

我是Filemaker菜鸟,所以我需要把它放在那里。

我有一个表(Gigs)和相关的门户网站表(Gigs_Join),其中门户网站中显示了歌曲列表。这些通过主表和门户表中的GigID连接。

我想复制Gig记录和所有相关的门户记录。我知道这必须要编写脚本,但是对我而言,我无法使其正常工作。

任何建议都值得赞赏!

1 个答案:

答案 0 :(得分:-1)

Try these steps,
1. Create two Table Occurrences GigsJoin1, GigsJoin2 based on Gigs_Join
2. Create two layouts (GigsJoin1, GigsJoin2) based on above TOs.

3. Write a script with following Steps.
    a. Go to Gigs layout.
    b. Save the Gig ID in a variable (OrigGigID).
    c. Duplicate the Gig record.
    d. Save the new Gig ID in a variable (NewGigID).
    e. Go to the layout GigsJoin1.
    f. Find the records using OrigGigID.
    g. Start Loop
        i. Go to first record
        ii. Copy all the field values in variables.
        iii. Go to layout GigsJoin2.
        iv. Create new record
        v. Set the values from variables.
        vi. Set the GigsID from variable NewGigID
        vii. Go to Layout GigsJoin1
        viii. Go to next record
    e. End Loop