11 Replies Latest reply on Feb 10, 2010 11:35 AM by philmodjunk

    How to write a Script for.......

    Dr.D

      Title

      How to write a Script for.......

      Post

      Our database is a file review process, each file has a # assigned to it, I like to build a logic which will alert me when the same file # is keyed in the database… And the file# is keyed in manually each time when a record is being created...

       

      Script is very new function to me, don't even have the basic understanding, so please be patience with me... Thanks

        • 1. Re: How to write a Script for.......
          philmodjunk
            

          I gather the number is assigned externally so you can't use an auto-entered serial number here.

           

          Go To Manage | Database | Fields

          Select the field definition by double clicking it

          Select the validation tab

          choose the unique value option.

          If you want, type in a message you want to see appear when the user enters a non-unique file number in the message box shown at the bottom.

           

          That's the simplest approach--no script required.

          • 2. Re: How to write a Script for.......
            Dr.D
               Oh, seriously that simple?!, will give it a try and let you know how it goes... Thanks !!!
            • 3. Re: How to write a Script for.......
              Dr.D
                

              It works !!! 

               

              Just wonder when to use " option - existing value " ??   Can you name an example... Thanks

              • 4. Re: How to write a Script for.......
                philmodjunk
                  

                Well that'd be the opposite of "unique value". It would keep you from entering any new values, limiting you only to values previously entered.

                 

                Never used it, but that's what it does.

                • 5. Re: How to write a Script for.......
                  Dr.D
                    

                  Hi PhilModJunk,

                   

                  The "Unique Value" works for my purpose, but one problem, when I use it on my user account (full access), I got option " Revert - Yes - No ", the Yes option is good as I get to choose to go ahead even when the # is repeated...

                   

                  However other user ( data-entry profile ), only get option " Revert - No ", the Yes option is missing, how do I fix it... Thanks

                  • 6. Re: How to write a Script for.......
                    Dr.D
                       Maybe Mr. PMJ is away, can someone else offer a solution of my latest posting??  Thanks
                    • 7. Re: How to write a Script for.......
                      philmodjunk
                        

                      It's been a busy week and I've been limited in cases where I should experiment with a test file before answering. It looks like your other user has access privileges set to prohibit validation overrides.

                       

                      I think if you edit their privilege set by selecting "Allow user to override data validation warnings", you'll get the yes option to appear. 

                      • 8. Re: How to write a Script for.......
                        Dr.D
                          

                        Thanks for taking the time, greatly appreciated it...

                         

                        On the setting for that particular field, I have already checked "allow user to override during data entry" (#), however the user only got option "Revert - No" as stated previously...

                         

                        Are you suggesting that I should modify the user account setting as well, and IF I do so, would relaxing the setting applies to ALL fields on the layout... My plan is to allow override in that particular field alone hence I set up as per (#) above thinking that's serve the purpose intended... Thanks  

                        • 9. Re: How to write a Script for.......
                          philmodjunk
                            

                          Yes enabling the validation override option in Access Privileges enables it for all fields.

                           

                          I played around with a sample file and the only way I got what you want was to reverse the logic here.

                           

                          1) Enable the validation override option for the user's PrivilegeSet.

                          2) To exclude the "Yes" option on your other fields, you'll have to open each field's field options and clear the "allow override" check box for that field.

                          • 10. Re: How to write a Script for.......
                            Dr.D
                              

                            I played with the User Setting while waiting for your response...

                             

                            I changed the user access from " Data-Entry ", to " allow user to override data validation warnings ", then sign on as that user to test, big problem - it said No Access to that user...

                             

                            Explanation Pease??  It does not make sense when you granted such privilege setting to the user and it turned out as no access...

                            • 11. Re: How to write a Script for.......
                              philmodjunk
                                

                              To do this you have to create a custom value set. When you do so, the default setting for everyting listed on the left hand side of the dialog defaults to "No Access". You'll need to select the appropriate options here to allow the user to do what they need.