4 Replies Latest reply: Nov 13, 2013 11:49 AM by CraigB RSS

    How to set prompt of an item by the value of another item dynamicall

    986026


      Hi,

       

      I am using below command to update prompt of an item by another item's value but it gives error;

       

      SET_ITEM_PROPERTY ('XXENEC_EPB_BUDGET_LINES.FUTURE_YEAR1',

                                     prompt_text,

                                     XXENEC_EPB_BUDGET_HEADERS.FUTURE_YEAR_FROM                          

                                    );                        

       

      Please correct me.

       

      Regards

       

      Farooq

        • 1. Re: How to set prompt of an item by the value of another item dynamicall
          CraigB

          What is the error?  We need to know this in order to offer you any solutions!  Also, please list your Forms version.

           

          Craig...

          • 2. Re: How to set prompt of an item by the value of another item dynamicall
            986026

            Thanks Craig for reply.

             

            Actualy error has been remvove but below is not working.

                  SET_ITEM_PROPERTY ('XXENEC_EPB_BUDGET_LINES.FUTURE_YEAR1',

                                           prompt_text,

                                           :XXENEC_EPB_BUDGET_HEADERS.PERIOD_YEAR                       

                                          );

             

            I am using POST_CHANGE trigger to execute it.

             

             

            while below is working

             

                  SET_ITEM_PROPERTY ('XXENEC_EPB_BUDGET_LINES.FUTURE_YEAR1',

                                           prompt_text,

                                           'ABC'

                                          );

             

            I need to set prompt dynamically.

             

             

            regards

             

            Farooq

            • 3. Re: How to set prompt of an item by the value of another item dynamicall
              O.Developer

              Please move  Post-CHange  to 'Post-Query '    then post here your  error.

               

               

              Secondly, in a multiple record  block, you will get only one value  as prompt  which  will give wrong info.. (upto your requirement)

              • 4. Re: How to set prompt of an item by the value of another item dynamicall
                CraigB

                Farooq,

                When do you need your code to execute?  After data is displayed (eg: Post-Query) or in response to a user edit (eg: Post-Change)?  If you need the prompt to change as a result of the record being queried and displayed, then I would agree with O.Developer and you should put your code in the Post-Query trigger.  If you need the prompt to change in both scenarios, then I would write a program unit and call it from the Post-Query as well as the When-Validate-Item triggers.  I rarely if ever use the Post-Change trigger since this trigger has been deprecated and is only included for backward compatibility.

                 

                What is your Forms version?

                 

                Craig...