This topic is locked

lookup where and field event

10/3/2024 9:43:00 AM
PHPRunner General questions
ffrinai author

Hi,
I want to filter a field based on the day of the week.

img alt

when i insert Data 02/10/2024 (day 3 of the week) i want in lookup DOVE only records with day 3, in my ex CITTA' DI CASTELLO and GUBBIO.
I tried various solutions, the last is:

DOVE_eventblur
Client Before
var ctrldata = this.getValue();
var ctrlgiorno = ctrl.getPeer('GIORNO');
var ctrlidgiorno = ctrl.getPeer('IDGIORNO');
var ctrldove = ctrl.getPeer('DOVE');
var giornosettimana=ctrldata.getDay();
ctrlidgiorno.setValue(giornosettimana);
var nomi_giorni=new Array("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato");
ctrlgiorno.setValue(nomi_giorni[giornosettimana]);

as you can see, the read-only Giorno and IDgiorno fields are regularly filled in

in DOVE lookUp iI inserted the filter
IDGIORNO = :IDGIORNO
(IDGIORNO is numeric, I also tried with GIORNO varchar GIORNO = ':IDGIORNO' )
img alt

the view giornicomm1
SELECT
IDSEDE,
IDGIORNO,
GIORNO,
SEDEDESCG
FROM giornicomm
GROUP BY IDSEDE, IDGIORNO, GIORNO, SEDEDESCG

but no record is proposed in the lookup menu

img alt

phprunner enterprise 10.91 build 41974x64

thanks
Fabio

ffrinai author 10/3/2024

errata corrige
(IDGIORNO is numeric, I also tried with GIORNO varchar GIORNO = ':GIORNO' )
sorry