6 Replies Latest reply on Mar 20, 2015 1:00 PM by chito

    help with script



      help with script



      I have a script where it checks the status, if the status is "DEAD" it will perform a replace field contents.  When I change the status to "DEAD" (field unmodifiable), it does not replace the field content of another field.  I test the script in debugger and it actually worked.  Can someone tell me what I did wrong or if i'm missing a step?  Thank you in advance.  Here is the how the script looks like:

      If [bol_Estimate::Status = "DEAD"

         Replace Field Contents [No dialog; bol_topsheets::Date; ""]

      End If

        • 1. Re: help with script

          You are missing a right bracket, probably a typo here.

          Just changing the value of a field (how do you do that if the field is not modifiable?) will not cause the script to perform so it may just be that you need to run the script once you have modified the value of the field. A script trigger such as onObjectSave or OnObjectModify may be all that you need, but this assumes that you are manually editing the value in a field or at least picking a value from a value list.

          • 2. Re: help with script

            Setting the script trigger did not work.  The value is not manually edited, a "dead" or "active" button changes the value. Thanks for your input, I'll continue to test.

            • 3. Re: help with script

              I really can't tell from what you have posted exactly what you have set up or what you are doing. If you need more help, you'll need to describe things in more detail.

              • 4. Re: help with script

                I apologize for not being clear.  Hope this pictorial description describes the situation better.


                • 5. Re: help with script

                  But if you are using set field to change the value of the field, this does not trip any script triggers as the set field step does not interact with layout objects. I'd set up that button to perform a script that both sets the status field and performs the script that you have set up to be run via a script trigger.

                  • 6. Re: help with script

                    Thank you.  I added a step to see if it's mark "dead" and if it is, it will removed the date.  Thanks again for your help.