Hey,
short question for the queryAndRender function, is something like this possible? I don't get it running:
id.queryAndRender(<From>;<Filter>;([count]);list)
I just want the count of total entries within another form for a specific filter.
Regards,
Michael
Try using queryCount better ;)
Ahh nice, and something like that for example?
id.queryAndRender(<From>;<Filter>;([entry.score])/([count]);list)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Much simpler , see https://wiki.vertuna.com/spaces/CONFIFORMS/pages/2359385/Virtual+functions
id.queryCount(form:pageId,filter)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay the count seems to be simple (thx for that ;)), but I want also do a kind of calculation...
In the other form I refer I have a calculated field "score", now I want calculate the average.
Therefore I was asking for:
id.queryAndRender(<From>;<Filter>;([entry.score])/([count]);list)
Define the form, name the filter and then use the expression to calculate all score divided by the count.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure I fully understand but most probably you can do something like
id.queryAndSet(form:pageId;filter;score).divide([entry.id.queryCount(form:pageId;filter)])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahh thank you, got your idea....tried this one!
id.queryAndAggregate(form:pageID;filter;field).divide([entry.id.queryCount(page:pageId;filter)])
In my table I have two field to aggregate (4+3,57). I want to divide the sum by the count (2), so this should give me the average.
Unfortunately, I got the result 4 instead of 3,78. So it seems they round the number up automatically.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.