DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the value of expression used in report template

Hi,

 

I have used a expression in DIAdem report table. Would like to use the value of this expression inside DIAdem script. Is there a way to do it effectively.

 

I have used a text list table and used expression inside this.

Durai26_0-1696614715941.png

sample expression: @@Data.Root.ChannelGroups(3).Channels("Test_name").values(1)@@

 

Output is a string.

 

regards,

Durai

 

0 Kudos
Message 1 of 2
(1,404 Views)

Hello Durai26,

 

the expression you use contains a piece of VBS code that you can use directly in a script:

call LogFileWrite(Data.Root.ChannelGroups(1).Channels("Speed").Values(1))

 

If the expression in the script should be read from the REPORT table and used in a script, then the expression can be determined via the REPORT table object. Read the expression from the table as follows. In this example, the expression is read from the table containing a text list and evaluates it. The value is then in chnvalue, which you can use in the script.

dim table, expression, code, chnvalue
set table = Report.Sheets(1).Objects("2DTable1")
expression = table.Columns(1).TextList.Item(1).Text
execute("chnvalue=" & replace(expression, "@@", ""))
call LogFileWrite(chnvalue)

 

AnJalpaka_0-1696839051198.png

 

Regards,

AnJalpaka

0 Kudos
Message 2 of 2
(1,347 Views)