9 Replies Latest reply on Jul 6, 2011 5:40 AM by millie

    Committing record just doesn't work!

    millie

      Title

      Committing record just doesn't work!

      Post

      I'm fairly new to scripting and thing I must be missing something obvious here.

      I am trying to get client info to automatically enter when the id is input.  I have tried to copy the formatting from the starter solution for invoices and as far as I can see have done exactly the same.

      However, this still doesn't work.  I suspect there may be an issue with the relationship between the fields but as far as I can see I have set this correctly.

      Are there any special steps that anyone can please help me with to try to overcome this? I have looked at committing records in the manual but it is of no help whatsoever.  I have also looked at setting relationships but this doesn't help either.

      I have been searching for days to try to resolve this - any help is VERY much appreciated!!!

      dbase3in1.jpg

        • 1. Re: Committing record just doesn't work!
          philmodjunk

          What relationship have you setup? (what tables, fields, operators?)

          Do you want a dynamic link to this data? (data stays in client info table, but is displayed on your layout when the ID# is entered here.)

          Or do you want to copy the data into fields in your layout's table? (This captures a "snapshot" of your client's current data, changes to the original table won't automatically show here.)

          • 2. Re: Committing record just doesn't work!
            IT_User

            I know from another forum post I was on, i suggested commiting the record in a script. The person actually commit the record at the very beginning of the scrript instead of the end. Not that I am saying you did that.

            In any case it seems to be hard to know with out more information like PhilModJunk asked.

            • 3. Re: Committing record just doesn't work!
              millie

              Hi there.  Thanks for responding, guys.

              Well I've set the fields up within tables and the relationship. What I want to achieve is that the client info automatically enters into the right fields when the client reference is entered.  The fields are serial no, customer name, address etc.

              I've set the relationship between the tables to link between the 2 corresponding fields in each table.

              The script trigger is set to work upon modification of the field.

              The script called 'commit record' shows only 'Commit Records/Requests [Skip data entry validation; No dialog]'

              I did take screen grabs of the relationship, script and fields but unfortunately can't attach to this post.

              Thanks again for any help you can give!

              • 4. Re: Committing record just doesn't work!
                Abhaya

                Hi

                Make the relationship like T1::ClientID=T2::ClientID

                T2 must contain a field that have all the ID in T1.

                then in T1 layout take all the fields from the above Relationship except the Client ID.

                what happened when u entered a clientID in that field it matches this in the relationship and brings all the corresponding field values.

                this values  will be display in the entered layout.

                No script rquired to attach.

                 Thanks

                • 5. Re: Committing record just doesn't work!
                  philmodjunk

                  "I did take screen grabs of the relationship, script and fields but unfortunately can't attach to this post."

                  You can click "Edit Post" on your original post and upload a single screen shot there.

                  You can upload screen shots to a file sharing site and then post the link to it any post you make to this forum.

                  • 6. Re: Committing record just doesn't work!
                    millie

                    Hi there - thanks for the advice...I've now uploaded the screen grabs.

                    Thanks to you Atauf as well - I have tried what you suggested but I just can't fathom it out - it hasn't worked.

                    If you have any suggestions based on my uploads then I would be grateful.

                    Thanks again

                    • 7. Re: Committing record just doesn't work!
                      philmodjunk

                      Using the relationship you have defined, if you enter/select a value in client_Company that matches the value in Main Confo::Client_Company for at least one record in that table, then the fields from Main Confo should automatically display data from that record.

                      If they don't, you'll need to investigate to see why the records aren't matching.

                      Are both Client_Company fields the same data type? (both text or both number?)

                      Are the data in these two fields exactly the same for any pair that are supposed to match? (In a text field, even one invisible space character that is in one field and not the other will keep them from matching.)

                      As a design note, your relationship appears to be based on company name, when basing it on a serial ID field would be much safer. (Companies sometimes change their names and this would cause problems for you if this field is the company name field.)

                      • 8. Re: Committing record just doesn't work!
                        millie

                        Hi PhilModJunk - thanks for this- will try now and keep you posted.

                        • 9. Re: Committing record just doesn't work!
                          millie

                          Well thanks a million PhilModJunk - you're a star!  Problem solved and I have a working section of my database.  Result!