Multiple dynamic drop down

Multiple dynamic drop down


Hi --

I have three fileds : ARTISTE_projet ; ARTISTE_date ; ARTISTE_seq


I'm trying to populate _date from selection in _projet, then _seq based on selection in _date (like cascading).

Based on this tutorial, I tried this:

In ARTISTE_projet on user input I have this:
  1. if (count(JOURNEES_Form[JOURNEE_projet == input.ARTISTE_projet])  ==  0)
  2. {
  3.     clear ARTISTES_date;
  4. }
  5. else
  6. {
  7.     datelist  =  JOURNEES_Form  [JOURNEE_projet == input.ARTISTE_projet] sort by  JOURNEE_DATE ;
  8.     ARTISTES_date:ui.add(datelist.JOURNEE_DATE.getall());
  9. }

...which does work by itself.

Then in ARTISTE_date on user input I have this:

  1. if (count(SEQUENCES_Form[SEQUENCE_date == input.ARTISTES_date])  ==  0)
  2. {
  3.     clear ARTISTES_date;
  4. }
  5. else
  6. {
  7.     seqlist  =  SEQUENCES_Form  [SEQUENCE_date == input.ARTISTES_date] sort by  SEQUENCE_Numero ;
  8.     ARTISTES_seq:ui.add(seqlist.SEQUENCE_Numero.getall());
  9. }

...which works by itself too.

Meaning that both will work separately, but not together, as this seems to cause a loop or something (circling arrows icon won't stop and the menu doesn't get populated).

PS : both code snippets do validate (i.e. no error message and the script gets saved).


Can someone help?

Many TIA.