ServerVariable runtime error in call( procedure

I have not used server variables before and am hoping to use one for my current project. However, I cannot get the example to work. I’m running

setservervariable "",PrintCount,PrintCount+1,0

and then

message servervariable("",PrintCount)

and I get “Runtime error in call( procedure.” Am I doing something wrong? I am definitely connected to the Panorama server, albeit over VPN as I’m working remotely.

I don’t see setservervariable in the Help file. There is assignservervariable which seems to be what you need.

Ah, I thought I was about to have a facepalm moment, but that appears to be for Panorama X. I’m working in Classic:

I think @sao is still using Panorama 6 server.

I think you’re saying that you get this error when you use the servervariable( function. I think the problem may be that this function requires that the variable name be surrounded by quotes. So the code you actually need is:

message servervariable("","PrintCount")

Hopefully at some point you’ll be re-working your databases for Panorama X. When you do, you’ll need to rewrite the code that uses the setservervariable function to instead use the new adjustservervariable statement.

This is from this Panorama X help page:

I think you’re saying that you get this error when you use the servervariable( function. I think the problem may be that this function requires that the variable name be surrounded by quotes.

That was it, thank you! I swear I read the documentation and noted the bit about quotes… sometimes you just can’t see the glaringly obvious.