beas scripting - variable returning two values in two different commands.

Phil Sparkes

Hi,

I'm writing script to open up the QC sample screen directly from the pool report for a customer. I'm getting the QC Order details from the highlighted row in the pool report as below (this all works fine)

setvar=psrow=<dw_1.getrow>
setvar=pswo=<dw_1.item.beas_tempreport_belnr_id:[<psrow>].value>
setvar=pspos=<dw_1.item.beas_tempreport_belpos_id:[<psrow>].value>
setvar=psrow=<dw_1.item.beas_ftapl_pos_text:[<psrow>].value>

setvar=pscharge=P<pswo>/<pospos>/<psrow>
messagebox=<pscharge>

The message box returns P101/10/20 - which is correct . The command to open the screen is this.

openwindow=qs_ftmessung_browse.psr=s_parm2:,s_parm1:<pscharge>,c_parm1:1

When this command is run it substitutes the variable, not with P101/10/20 (like the messagebox)  but with the text of the original variables I used - like this.

<dw_1.item.beas_tempreport_belnr_id:[<psrow>].value>/<dw_1.item.beas_tempreport_belpos_id:[<psrow>].value> etc... In effect it is 'evaluating it' twice.

If I replace my setvar with this:

setvar=pscharge=P101/10/20

then it works just fine. How can I stop it doing this? Or how can I format the line correctly to stop this from happening.  I've tried <%var("pscharge")> which didn't work and I could find no information on how to stop this from happening.

Thanks !

Comentarios

2 comentarios

  • Comment author
    Martin Heigl

    Hi Phiol

    This is wrong
    setvar=pswo=<dw_1.item.beas_tempreport_belnr_id:[<psrow>].value>

    the system don't translate it. In messagebox we've a double translation - this can be the reason, that is working. But a < inside < is not allowed. This is the reason to use [] as placeholder inside <>

    setvar=pswo=<dw_1.item.beas_tempreport_belnr_id:[psrow].value>

    regards
    Martin

    0
  • Comment author
    Phil Sparkes

    Thanks Martin - yes I see that now. Simple mistake but it's cost me hours...

    0

Iniciar sesión para dejar un comentario.