I tried to change Category field with query in field “Category” from Calendar aplication. I need to put between “( )” the sumary of events from this month and year, but I have two problems:
1.- The first time when load calendar the category it done ok, but when change of month from button calendar my Category it don’t update.
In my field Category put this script in Lookup
SELECT ID_LUGAR, LUGAR ||’ (’||
(
Select count(he.id_even)
from hevento he
where he.id_salon= [var_salon]
and he.estado in (1,2,3,4)
and Extract(year from he.fechahora) = [var_aniofecha]
and Extract(month from he.fechahora) = [var_mesfecha]
)
||’)’ FROM MLUGAR
WHERE ID_SALON = [var_salon]
ORDER BY 2
I need to know what variable to get to “month” and “year” to replace my variable “[var_aniofecha]” and “[var_mesfecha]”;
2.- How to replace in my sql script the variable that of the current month and current year from calendar, what sintax is correct with “{variable}” or “[variable]” and is necesary to reload this variables on someone event from calendar (onLoad, onscriptinit, etc.)
Any ideas how to solve this?
Thank you.