Ajax Reload date field

I have field date says {BIRTH_DATE}, then I have select field {TOYS}.
In Select field {TOYS} I have where clause and filter based on Year({BIRTH_DATE}).

How will Ajax events handle this (reload {TOYS}), while field {BIRTH_DATE} has no Ajax activation (Only Select, Check… Has !)

I have the same scenario,

I have field date says {BIRTH_DATE}, then I have select field {TOYS}.
In Select field {TOYS} I have where clause and filter based on Year({BIRTH_DATE}).

How will Ajax events handle this (reload {TOYS}), while filed {BIRTH_DATE} has no Ajax activation (Only Select, Check… Has !)

[QUOTE=lpangemanan;40724]I have field date says {BIRTH_DATE}, then I have select field {TOYS}.
In Select field {TOYS} I have where clause and filter based on Year({BIRTH_DATE}).

How will Ajax events handle this (reload {TOYS}), while field {BIRTH_DATE} has no Ajax activation (Only Select, Check… Has !)[/QUOTE]

No activation, no event no nothing I’m affraid. See answer in other thread.

Thast’s the point ! now I’m stuck ! how can we create New Ajax Events for Date field where triggered on change to reload other fields (Select type) :frowning:

Create an ajaxevent onchange or onblur and in that event change a global variable to the select of the new toys list. In the select of the toyslist use this variable to do the right selection. After onblur/onchange do a sc_redir to itslef or sc_exit(sel) and the form will be repainted. If you think this is too difficult than you can consider creating a dropdown of birth years. Then you can scroll down to trigger the ajax event to refresh the toys list automatically.

Thanks again for your help !

Seems getting close, but I might missed somthing. I did try both :

  1. _onBlur of my date field I put : sc_exit(sel);
    Tested it, soon after leaving entry of date field I saw Processing Animation, but no repaint nor reload other Select field. Could be something need to add ?

  2. _onBlur of my date field I put :
    $redir_app = ‘form_fi010’;
    $redir_param = ‘’;
    $redir_target = ‘_self’;
    sc_redir($redir_app, $redir_param, $redir_target);

    Tested it, soon after leaving entry of date field, screen refresh and back to initial screen where supposed stay in Add new record mode. This is never ending loop, So after Clik on Add and enter date, soon after leaving date field its return to initial screen again, where supposed stay ini Add New Record Mode. Could I missed something here ?

Very appreciate your help…

In the past, this general approach has worked for me: in onChange ajax event of the date field, sc_set_focus(select_field) and then run the select query you would normally place in the search lookup. Hopefully it works with onBlur too without unintended effects.

This is exactly what we need ! You are the best as always :slight_smile:

Thanks a lot !!! God Bless !!!

ok this may be a long time back but i cant seem to get it working…
am trying to load a select field (dropdown box) programatically using this:
while(!$rs->EOF)
{
{g3} += (string)$rs->fields[0];
echo “<br>”. $rs->fields[0];
$rs->MoveNext();
}
$rs->Close();

a select field needs a label and a value…how do i do that?

You “can’t”. Select must be filled by automatic or manual lookup

Ok, this is annoying…seriously Netmake should work on it!!

I think you can put your select statement in the field directly. You do not need make a WHILE.

I did sc_set_focus(select_field) but don’t know how to refresh the select fields , how run the select query?