I am trying to add one filter that allows me to search for this combination of numbers (2,935,260), however I haven't found one way that allows me to remove or add the comma the search filter inside the aggregate.

What I have right now, that only allow me to search for is without the commas, only the number combination which is:

Searchkeyword is the variable attached to the input and the product SKU is that combination of the numbers and commas.

SyntaxEditor Code Snippet

Product.SKU=SearchKeyword

try to add one column of type text in your aggregate, and then give expression to return the comma number.

and search again by comparing the session with the new column.

Hi leo,

Your link is not accessible, it redirects to a login screen, but from what you describe the best would be using an IN clause - but Aggregates don't have a direct equivalent. There's two alternatives:

 - convert your Aggregate to an Advanced Query and create an input with Expanded Inline set to Yes, so you can generate an IN clause and perform the search you're thinking of;

 - create a new Attribute in your Aggregate and then determine there if the entity records hold one of the values you've searched for:


Afonso Carvalho wrote:

Hi leo,

Your link is not accessible, it redirects to a login screen, but from what you describe the best would be using an IN clause - but Aggregates don't have a direct equivalent. There's two alternatives:

 - convert your Aggregate to an Advanced Query and create an input with Expanded Inline set to Yes, so you can generate an IN clause and perform the search you're thinking of;

 - create a new Attribute in your Aggregate and then determine there if the entity records hold one of the values you've searched for:



I'm afraid you missunderstand, I have the filter that allows to search for that exact combination of numbers, when add the comma to search input it does not show results.

What I need is filter that can applied when the sku is just number or it has commas.

Is there a way I can ignore the commas on the filter?

leo ferreira wrote:

Afonso Carvalho wrote:

Hi leo,

Your link is not accessible, it redirects to a login screen, but from what you describe the best would be using an IN clause - but Aggregates don't have a direct equivalent. There's two alternatives:

 - convert your Aggregate to an Advanced Query and create an input with Expanded Inline set to Yes, so you can generate an IN clause and perform the search you're thinking of;

 - create a new Attribute in your Aggregate and then determine there if the entity records hold one of the values you've searched for:



I'm afraid you missunderstand, I have the filter that allows to search for that exact combination of numbers, when add the comma to search input it does not show results.

What I need is filter that can applied when the sku is just number or it has commas.

Is there a way I can ignore the commas on the filter?

Hi leo ferreira,

If i understood correctly you want to remove the comma(s) before aplying the filter correct?

if so, why not just use the "replace" function and convert the string to a integer before applying the filter?

 - https://www.outsystems.com/forums/discussion/34361/replace-text-function/

For example:   TextToInteger(Replace(VAR_TEXT,",",""))

Best Regards 

Rodrigo Henriques

You can parse the string before passing it to your query and remove the commas with the built-in Replace function, but how are you going to write a filter that can handle a variable number of integers? 

Are you going to limit it to three possible searches? What happens if I write 1,2,3,4,5?

Rodrigo Henriques wrote:

leo ferreira wrote:

Afonso Carvalho wrote:

Hi leo,

Your link is not accessible, it redirects to a login screen, but from what you describe the best would be using an IN clause - but Aggregates don't have a direct equivalent. There's two alternatives:

 - convert your Aggregate to an Advanced Query and create an input with Expanded Inline set to Yes, so you can generate an IN clause and perform the search you're thinking of;

 - create a new Attribute in your Aggregate and then determine there if the entity records hold one of the values you've searched for:



I'm afraid you missunderstand, I have the filter that allows to search for that exact combination of numbers, when add the comma to search input it does not show results.

What I need is filter that can applied when the sku is just number or it has commas.

Is there a way I can ignore the commas on the filter?

Hi leo ferreira,

If i understood correctly you want to remove the comma(s) before aplying the filter correct?

if so, why not just use the "replace" function and convert the string to a integer before applying the filter?

 - https://www.outsystems.com/forums/discussion/34361/replace-text-function/

For example:   TextToInteger(Replace(VAR_TEXT,",",""))

Best Regards 

Rodrigo Henriques

This way: TextToInteger(Replace(VAR_TEXT,",","")) it works

Thanks!