Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The set expression editor is giving me an error when I try to use the P() function in this way:
sum({$ < FIELD_1 = {$1}, FIELD_2 = {$2}, Period = P($3) > } Amount)
I'm "calling" this like:
vFunction(A,B,Q1) , vFunction(A,B,Q2)...
So the third parameter $3 is changing, as it's a date. Q1 and Q2 are text(date#) format and
Period is a date format. So the expression does what I want, but it's giving me an error and I would like to write it properly.
Thank you
Are Q1 and Q2 fields within your datamodel? Further comparing real dates with strings will only work in some very specific cases and should be therefore in general avoided.
- Marcus
Hi, thanks for the reply, yes they are fields. I made them this text format while I was testing something. I can make them into a date again. The main point is that if I write:
Period = P(Q1),
there will be no error.
But if I write P($3), there is an error...
Try it in this way: vFunction(A,B,[Q1])
- Marcus
Hi, the call of the function (within a master item) is not causing an error. It's the function itself (where P($3)) . I tried with P([$3]) and all kinds of different brackets but I guess I didn't find the right one, or it's a bug in the expression checker itself.
If it's worked you could ignore the expression checker which is a good indicator but is independent from the executing engine and therefore not mandatory the truth.
- Marcus