[SOLVED] Pass numeric Component variable as parameter

Author: lalitpct@gmail.com (lalitpct)

1. Passing Component variable with activate "screen5".exec($CV_TEMP$) 2. Code from screen5 (execute) params numeric par1 : IN endparams $CV_TEMP$ = par1 putmess "par1 : par1 " putmess "par1 : %%par1 " putmess "par1 : %%par1%%% " putmess "cv_temp : %%$CV_TEMP$ " putmess "cv_temp : %%$CV_TEMP$%%% " But the parameter is not printed , is there anything that I need to change here

5 Comments

  1. If you run it under the debugger (just add a line "debug" before activate screen5), is there any "strange" info? - what value has $CV_TEMP$ in the calling component? - does the same value shows up as soon as the debuger reaches sceen5?


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. ulrich-merkel said If you run it under the debugger (just add a line "debug" before activate screen5), is there any "strange" info? - what value has $CV_TEMP$ in the calling component? - does the same value shows up as soon as the debuger reaches sceen5?

    – what value has $CV_TEMP$ in the calling component? Ans : I hard code it to some value – does the same value shows up as soon as the debuger reaches sceen5? Ans : Value is null as shown below (_execute) EXEC:2 putmess "par1 : par1 " par1 : par1 (_execute) EXEC:3 putmess "par1 : %%PAR1 " par1 : (_execute) EXEC:4 putmess "par1 : %%PAR1 " par1 :  (_execute) EXEC:5 putmess "cv_temp : %%$CV_TEMP$ " cv_temp :   Tried both below code in the original screen , not sure why parameter doesn't get passed. activate “screen5”.exec($CV_TEMP$) activate “screen5”.exec(CV_TEMP)


    Author: lalitpct (lalitpct@gmail.com)
  3. ulrich-merkel said If you run it under the debugger (just add a line "debug" before activate screen5), is there any "strange" info? - what value has $CV_TEMP$ in the calling component? - does the same value shows up as soon as the debuger reaches sceen5?

    Hi Uli, Can you give a simple code how you would have done it , even my hardcoding of variable is not being passed properly.


    Author: lalitpct (lalitpct@gmail.com)
  4. Hi   Just try activate “screen5”.exec(12) Or putmess "passing $CV_TEMP$. Value: %%$CV_TEMP$%%%" activate "screen5".exec($CV_TEMP$)   If $CV_TEMP$ is not defined in the calling component, so you are passing nothing.


    Author: luis.vila (luis.vila@uniface.es)
  5. Hi Uli/Luis, Thanks for the help , sorry just wanted to inform u that I didn't update signature which was reason I getting weird output.


    Author: lalitpct (lalitpct@gmail.com)