2 Replies Latest reply on Feb 17, 2011 10:34 PM by AaronLopez

    Trouble adding new records related to current record.

    AaronLopez

      Title

      Trouble adding new records related to current record.

      Post

      Hello FM forum.  I have been pulling my hair out trying to figure out how to make this work.  It's been very difficult finding an answer in a forum.  For this issue I am using 3 tables.  There are 5 in the screen shot but disregard Inventory and Fund 2 for this issue.  All the main data sits in the Property table.  Then the financials used are in their own table.  When I am in a record from the property table I created a button on the form that runs a script that says "Add Offer"  This script is supposed to add a record in the financialsREO table, copy the propertyID from the financials table(that is my relationship), and also copy the field ARV from the financials table into the financials REO table.  For the life of me I cannot get any data to move over.  I have the table field set to look-up and did a set field in my script.  Can anyone please help me get sleep at night?  I am including a pic of my table relationships.  

        • 1. Re: Trouble adding new records related to current record.
          philmodjunk

          Don't see any image uploaded with your post.

          This is the typical script for moving data from one table to a new record in another.

          Freeze window
          Set Variable [$PropertyID ; value: Property::PropertyID]
          Set Variable [$ARV ; value: Financials::ARV]
          Go To Layout [Financials REO]
          New Record/Request
          Set Field [ Financials REO::PropertyID ; $PropertyID ]
          Set Field [ Financials REO::ARV ; $ARV ]
          Go To Layout [original layout]

          Note, the ARV value will only be transferred correctly if there is a valid relationship between the current Property record and a record in the Financials table.

          • 2. Re: Trouble adding new records related to current record.
            AaronLopez

            I'm so stupid.  I never even thought to use a variable.  I have been trying to use the lame SetField.  I'll give this a shot.  To comment on your note...for ever new record that is created in the Property table, a records is created in the Financials table with the related property ID inputed in the field Financials:PropertyID.  I was trying to use the same mentality to handle the issue above and just could not get any results.  Thanks for the post.  I will try this and reply the results.  Thanks a ton.