3 Replies Latest reply on Dec 3, 2009 3:51 PM by philmodjunk

    Notes Section

    Jeff123

      Title

      Notes Section

      Post

      Hi,

       

      I am now trying to get a notes section in a new database (using a Mac) that looks and acts the same as the one in the "Contact Management" database.  What I am doing is trying to mimic and copy and paste the nessessary fields and tables from that database to the new one.  I am then attempting to use the scripts and the fields as templates to make it work on the new database, but it isn't working at all for me.  What I have is:

       

      Table 1 (called notes):

      Fields:

       Date_Created

       Date_Modified

       Kp_ID (this is what I linked with the main table, Kf_ID... I think it might be my relationship that is screwed up)

       NoteInfo

       Text

       TimeStamp_Creation

       TimeStamp_Modification

       UserName_Created

       UserName_Modified

       

      Table 2 (main table):

       I only have Kf_ID that is related to the Notes table, no other fields are related

       

      As for script, I have:

       Set Variable [$ID_Contact; Value:Contact Management::k_ID_Contact]

       Freeze Window

       Go to Layout ["Notes_Utility" (Notes)]

       New Record/Request

       Set Field [Notes::kp_ID] 

       Commit Records/Requests [Skip data entry validation; No dialog]

       Go to Layout [original layout]

       Go to Field [Notes::Text] 

       

      As for the objects, its all the same as the Contact Management database.  Portal, Edit Box linked to ::Text, and "add note" button (which has the script attached).

       

      Can some one tell me where I went wrong and maybe offer some suggestions to make it work (mind you if it is my relationship, I am clueless on how to fix it).  Or if I didn't give enough information, can someone give me general guidelines on how to do it using generic names where specific would be required. 

       

      Thanks in advanced :) 

       

        • 1. Re: Notes Section
          ninja
            

          Howdy Jeff123,

           

          You want to set the field ID, but you didn't tell it what to set it TO.

          Is that the only issue? 

           

           


          Jeff123 wrote:

          Table 2 (main table):

           I only have Kf_ID that is related to the Notes table, no other fields are related

           

          As for script, I have:

           Set Variable [$ID_Contact; Value:Contact Management::k_ID_Contact]

           Freeze Window

           Go to Layout ["Notes_Utility" (Notes)]

           New Record/Request

           Set Field [Notes::kp_ID ; $ID_Contact

           Commit Records/Requests [Skip data entry validation; No dialog]

           Go to Layout [original layout]

           Go to Field [Notes::Text] 


           


          • 2. Re: Notes Section
            Jeff123
              

            Thank you, but its still not working.  I have a relationship from Contact Management table to my main table as "kp_ID_Contact" to "Kf_ID" and then for my Notes table I have the relationship from "Kp_ID" to my main table's "Kf_ID".  I have no other relationships.

             

            I do not use anything from the Contact Management table, I only have it in hopes to get the script to work.

             

            Right now, when I click the "add note" button (with that script above) it doesn't do anything.  If I move it out of the portal it still doesn't do anything, I cannot even click on it and type stuff manually.  If I put it in another tab it will send me to my first tab when I click on the "add note" button.  I am soooooo confused!

             

            I made the name kp_ID and kf_ID, so does that make it a key?  or do I have to click something to make it a key?  and Kf_ means that it is the "main key" while the Kp_ makes it the key for that table but secondary to the main key?  

             

            Thats the only thing I can think of that is messing up this function I am doing... relationships. 

             

            Thanks 

            • 3. Re: Notes Section
              philmodjunk
                

              Is Kp_ID in table 1 defined as an auto-entered serial number? If not, it should be.

               

              (Any field is a "key" field if it is used to link two tables in a relationship. The name given has nothing to do with that. If you see it on the end of a relationship line in Manage | Database | Relationships, it's a key)