Hi,
I'm trying to create a simple condition: IF [Total FV]>0 THEN "REC" ELSE "PAY" ENDIF
But I keep on receiving INVALID TYPE in OPERATOR.....there's a problem with > operator
I tried to put "" before/after "[Total FV]>0"....then the error message disappeared but the results were rubbish as Total FV was assigned only "PAY".
Thanks for any advice.
Solved! Go to Solution.
Hi @peter987 ,
Add a select before formula or check metadata for [Total FV] data type .
The error may be because [Total FV] is not numeric.
Thanks,Benakesh
the thing is that Total FV is numeric...just wanna make simple condition if Total FV (fair value) is > 0 then it is REC (receivable) if not it is PAY (Payable)
I checked that data format of Total FV is V_WString so it should be set as numeric.
Thanks a lot.
sorry, I just found there should be "" before/after 0....now it works perfectly:)
IF [Total FV]>"0" THEN "REC" ELSE "PAY" ENDIF
Hi @peter987
Your formula is legit, but it may be because the field you're creating isn't a string field, but you're trying to write and output such as "PAY". Assuming you're creating a new field, you'll want to make sure it is a string to allow that kind of result, such as this (note the highlighted part):
Hope that helps
thanks
Andy
@peter987 wrote:sorry, I just found there should be "" before/after 0....now it works perfectly:)
IF [Total FV]>"0" THEN "REC" ELSE "PAY" ENDIF
That implies that the Total FV field is not numeric; it's probably worth making sure it's numeric if you're wanting to use > or < functions, to ensure you always get the results you expect downstream!
Thank you ever so, Andy!
Hope this helps other users too cause I couldn't get the hang of it for ages:)
No problem 🙂
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |