You must provide a value expression on the right-hand side of the '-' operator

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
User avatar
ashishk
Posts: 19
Joined: Mon Feb 13, 2017 1:09 pm

You must provide a value expression on the right-hand side of the '-' operator

Post by ashishk » Tue Apr 04, 2017 12:36 am

Product, version and build:
(*** Please do not write "latest" as a version, specify a version number ***)
32 or 64 bit version of product: 64
Operating system: Widnows 7
32 or 64 bit OS:64
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM


Using PrimalScript I compiled script for 64 bit and 32 bit machines. I am running the command as

updateUser.exe -commit 0 -location c:\userlogs

This is working perfectly in 64 bit machine, but when I run on Windows 7 32bit machine I am getting following error

You must provide a value expression on the right-hand side of the '-' operator

Any idea what could be the cause and how to resolve this?

Ash

User avatar
Alexander Riedel
Posts: 7049
Joined: Tue May 29, 2007 4:43 pm

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by Alexander Riedel » Tue Apr 04, 2017 12:51 am

That is impossible to tell without your code and the actual error message containing a line number.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
Alexander Riedel
Posts: 7049
Joined: Tue May 29, 2007 4:43 pm

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by Alexander Riedel » Tue Apr 04, 2017 1:01 am

Upon reviewing your account I noticed that you received a trial extension on February 13th for 30 days. That extension has expired now.
Please associate a license with you account for further support. Thank you.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
ashishk
Posts: 19
Joined: Mon Feb 13, 2017 1:09 pm

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by ashishk » Tue Apr 04, 2017 4:25 am

Alenxender

To get the license version, I already raised a request to my purchase report to buy the license.

However if you see below code, I am getting error in row 20.
Attachments
32biterror.png
32biterror.png (40.12 KiB) Viewed 13792 times

User avatar
Alexander Riedel
Posts: 7049
Joined: Tue May 29, 2007 4:43 pm

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by Alexander Riedel » Tue Apr 04, 2017 9:41 am

No idea. You should probably post this in the PowerShell section. This is most certainly not a product problem.
From the snippet of code I see no '-' operator in that line, so most likely the line number is off for some reason.
One thing stands out in this code though. You never check if $formatedSheetData actually contains valid data.
If it does not, $process.Action in line 19 would fail.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
ashishk
Posts: 19
Joined: Mon Feb 13, 2017 1:09 pm

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by ashishk » Tue Apr 04, 2017 10:09 pm

Alexender

I found the problem, actually -notin element is not supported in PowerShell 2.0. So I used -notcontains element and it works.

Secondly as you said about $formatedSheetData, actually it will never empty because csv which I am porting always have two rows.