10-06-2023 12:55 PM
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.
sample expression: @@Data.Root.ChannelGroups(3).Channels("Test_name").values(1)@@
Output is a string.
regards,
Durai
10-09-2023 03:12 AM
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)
Regards,
AnJalpaka