1 Reply Latest reply on Jan 29, 2014 2:35 PM by keywords

    Script for entering data which can then not be altered


      I would like to add a Script to my quotation layout that allows the Costings department give a Recommended Selling Price for the quotation. Once they have done this the RSP will show and be unalterable and there will also be a Timestamp and name beside it to show who gave the price and date.

      So the script will be triggered.

      It will then go to the RSP field

      Data will be input into the RSP field

      Script will then ask for the data to be confirmed.

      Data will be confirmed

      Datestamp and Name will be shown next to RSP field.

      RSP will also be shown but will not be unalterable


      I probably should have another script if the price has to be changed due to specifications changing.


      Please let me know if anyone has any ideas?


      PS I'm not that technie.

        • 1. Re: Script for entering data which can then not be altered

          There are a number of ways you can do this:


          1.     You could simply set the field to "prohibit modification of value during data entry" (see screenshot). This will prevent any manual change to the field contents, but scripted entry or modification will still work. To avoid users getting a dialog box come up if they try to change it you can set the field to not allow entry in Browse mode, so they can't even click into it.


          2.     You could do just the last part (ie. not allow entry in Browse mode) for any instances of the field which users will have access to.


          3.     You could create a script with the following steps:

                         Set Error Capture [ On ]

                         GotoField[ ]
                         Exit Script [ Result: False ]


          and set an OnObjectKeystroke script trigger on any instance of the field to which users have access, so that any keystroke will simply jump the cursor out of the field.


          Keep in mind that method 1 will prevent manual change to the field anywhere it appears; methods 2 and 3 will only work on field instances that are thus set.