Expression on a variable - excel function tricks?

5 Posts
4 Users
0 Likes
33 Views
(@m-nauarcinfo-com)
Posts: 49
Trusted Member
Topic starter
 

Hi,
in PcVue 12.0 we can add excel fuction like : ExcelGetCell inside an expression on a variable (see the image attached).
We can't add a text variable as result in a expression on a variable. Does it mean that the function ExcelGetCell is unsuable?
Maybe I miss something. Does a trick exist?
Thanks

Manu

 
Posted : 13/01/2020 10:42 pm
KASI
 KASI
(@k-simanjalamarcinfo-com)
Posts: 134
Estimable Member
 

Hi Manu,

If I am not wrong, these functions were mainly to be used in Application Architect where you can perform "Define by Expression" for variable properties. There is also function JsonGetValue that you can only use inside Application Architect. You have to define the input excel file or json input somewhere first. I have heard of this feature but have not try it out yet, so I am not sure.

Thanks,
Kantha

 
Posted : 14/01/2020 9:08 am
 GRCH
(@g-chovelonarcinfo-com)
Posts: 26
Eminent Member
 

Hello,
As Kantha said, these instructions are used in Application Architect, and refer to an Excel file ( but this Excel file has to be declared in Application Explorer).
if you go on the online help with the key word "ExcelGetCell ", you will have more information.
Pay also attention to the section where isthe documentation ; in this case Apllication Architect; so it means they suppose to be used in AA.

I don't know exactlly why; but these Excell instructions can be found in an Expression on variable because it is something like the PcVue instructions engine is in common for Expression fields.
So, you can see displayed instructions available but doesn't mean it will work at the end...

BR,

Grégoire

 
Posted : 14/01/2020 8:03 pm
(@m-nauarcinfo-com)
Posts: 49
Trusted Member
Topic starter
 

Hello,

that 's what I thought, but I just wanna be sure.

The fact is one of my customer who discovered that feature, wants to use it in an expression...:oops:

Thanks for your help
Manu

 
Posted : 14/01/2020 8:29 pm
f.martin
(@f-martinarcinfo-com)
Posts: 148
Member Admin
 

Hello,

Excel functions can be used in Expressions.

With a result variable of type bit:
- value 1 and -1 in Excel return 1
- otherwise it always returns 0 (with good quality)

With a result variable of type Register
- any numerical value is interpretated as it. If value is out of the bound, quality of the variable is set NS L
- other non numerical values return 0 (with good quality)

 
Posted : 14/01/2020 9:11 pm