Hello,
Is there any equivalent of {sc_where_filter} for a search application ?
Is it possible with javascript or php to store the selection in a variable ?
Thanks for your help.
Hello,
Is there any equivalent of {sc_where_filter} for a search application ?
Is it possible with javascript or php to store the selection in a variable ?
Thanks for your help.
Here is more information on my problem: I want to make a sc_redir from a search application to a grid application with the where_filter string.
(Because it is not possible to make an application link to a grid but only to a form).
{sc_where_filter} is apparently not available in a search application but if I add the following code (*) at the end of the function monta_form() generated by scriptcase in MySearch_test_call_grid_pesq.class.php, I can see the where_filter string
(*) only to debug because the code is always regenerated by scriptcase
$debug = $_SESSION[âsc_sessionâ][$this->Ini->sc_page][âBDO_PR01_Search_test_call_gridâ][âwhere_filterâ];
echo '<pre>' , var_dump($debug) , '</pre>';
Here is the result of this code
Unfortunatly, if I add this code in the onValidate event of the search application, it doesnât work.
My question is:
Is it possible to intercept the where_filter string that exist at the end of the function monta_form() generated by scriptcase for using it in the onValidate event in the sc_redir macro of the search application ?
Hello.
Have you tried to play around with âsc_where_currentâ and âsc_where_origâ macros ?
Yes. Thank you.
sc_where_current has the same scope as sc_where_filter and the same error message when trying to use in onValidate event in a search application (âUndefined propertyâ)
sc_where_orig has a wider scope according to the documentation but I canât find the onAfterValidate event as explained in the documentation.
When used in onValidate event, I receive the same message
Looks like the documentation is obsolete and the event names have changed.
I can find the the âonScriptInitâ, âOnRefreshâ, âOnSaveâ and âOnValidateâ events in the âAdvanced Searched/Eventsâ section in a Grid Application.
Iâm able to use âsc_where_currentâ in the âonInitâ of a grid application.
Canât say more, sorry. Iâve never used a search application.
Thank you anyway for your intervention.
I have the beginning of a solution.
The use of the following instruction works in onValidate event
$debug=$_SESSION[âsc_sessionâ][$this->Ini->sc_page][âBDO_PR01_Search_test_call_gridâ][âgrid_pesqâ];
For the above example, it gives me the following array
array(5) {
[âpr_numeroâ]=>
array(3) {
[âvalâ]=>
array(1) {
[0]=>
array(1) {
[0]=>
string(4) â4567â
}
}
[âcmpâ]=>
string(9) âpr_numeroâ
[âopcâ]=>
string(2) âgtâ
}
[âpr_nroconventionâ]=>
array(3) {
[âvalâ]=>
array(1) {
[0]=>
array(1) {
[0]=>
string(5) â56789â
}
}
[âcmpâ]=>
string(16) âpr_nroconventionâ
[âopcâ]=>
string(2) âltâ
}
[âpr_datdebengagâ]=>
array(3) {
[âvalâ]=>
array(2) {
[0]=>
array(3) {
[0]=>
string(4) âD:10â
[1]=>
string(4) âM:11â
[2]=>
string(6) âY:2012â
}
[1]=>
array(3) {
[0]=>
string(4) âD:10â
[1]=>
string(4) âM:11â
[2]=>
string(6) âY:2012â
}
}
[âcmpâ]=>
string(14) âpr_datdebengagâ
[âopcâ]=>
string(2) âeqâ
}
[âid_nomâ]=>
array(3) {
[âvalâ]=>
array(1) {
[0]=>
array(1) {
[0]=>
string(4) âazerâ
}
}
[âcmpâ]=>
string(6) âid_nomâ
[âopcâ]=>
string(2) âqpâ
}
[âid_prenomâ]=>
array(3) {
[âvalâ]=>
array(1) {
[0]=>
array(1) {
[0]=>
string(6) ârazerâ
}
}
[âcmpâ]=>
string(9) âid_prenomâ
[âopcâ]=>
string(2) ânpâ
}
}
OnScriptIni
if ( isset( $_SESSION[âsc_sessionâ][$this->Ini->sc_page][âBDO_PR01_Search_test_call_gridâ][âwhere_filterâ]) ) {
$debug = $_SESSION[âsc_sessionâ][$this->Ini->sc_page][âBDO_PR01_Search_test_call_gridâ][âwhere_filterâ];
echo â
â , var_dump($debug) , ââ;