Popup window with criteria field

Popup window with criteria field

  
Hi,

I'm very new to outsystems, and i've been having a problem with a Popup window. My Popup window gives me a list of records from where i select one. The problem is that i need to apply a filter to my genericSelectPopup, and i'm having javascript errors.

I have this onclick on my extended properties:

The goal is something like this....
"Criteria","{SPS_COLABOR}.[IndSituac] <> 'I' "

But when i put it on the extended properties i've got an error of javascript at run time...

"window.open('" + GetEntryURL("ColaboradorSingleSelect", Site.TenantName, "CallBack", "pickCountryFunction", "Criteria","{SPS_COLABOR}.[IndSituac] <> \'I\' ") + "&Keyword='+" + "escape(document.getElementById('" + SPS_COLABOR_DesEntida.Id + "').value)" + ",'_blank','top=100,left=100,height=680,width=600,status=yes,toolbar=no,menubar=no,location=no');return false;"

I've tried to replace ' by ", i've put \', I've tried to put the value in a input and use the getElementById, but when i resolve the problem with the javascript the query doesn't work.

Any suggestion would be appreciated. Thanks in advance

Cecília Oliveira
Hi,

If i understand correctly your problem, you have a combo box to filter and table record where you select your records. To filter, on the event onchange of the combo box, you need an action refresh your table records, similar to the action refresh table of the template for Outsystems 4.2.
That action do the query, assign that query results to a record list and use an ajax refresh to update the table records, the source of tablerecords must be the record list variable.
If i understand correctly your problem i think that solves your problem, if your Outsystems version is 4.2.

Nelson Inácio
Hi Nelson,

Maybe i didn't explain myself very well... I don't have any combo box. I've a link that opens a generic popup window, with a table record( some people call it LOV - List of Values, for the user selection of records), the window returns the record selected to the parent window. The table records must come already filtered by that Criteria. If i don't use Criteria everything works fine.

Thanks in advance
Cecília Oliveira
You select the criteria before open the lov, you have to send that criteria parameters to the popup screen to filter the query, create input parameters or execute query at parent window and send the record list to the popup to fill the table. Other option is to filter the table records inside popup.
Hi Nelson,

Thanks for your help, but what i wanted was this:

"window.open('" + EncodeJavascript(GetEntryURL("ColaboradorSingleSelect", Site.TenantName, "CallBack", "pickCountryFunction", "Criteria","{SPS_COLABOR}.[IndSituac] <>'I'")) + "&Keyword='+" + "unescape
(document.getElementById('" + SPS_COLABOR_DesEntida.Id + "').value)" + ",'_blank','top=100,left=100,height=680,width=600,status=yes,toolbar=no,menubar=no,location=no'); return false;"

Using EncodeJavaScript function i can put my criteria with single quotes.

Cecília Oliveira