cancel
Showing results for 
Search instead for 
Did you mean: 

Error with some values while using setFilterExt

vincentdechandon
Contributor
0 Kudos

Hi guys.

I'm making a component where the user can script through the Additional Properties to filter a datasource.

Suppose the designer chose to filter by Name.

The getter in contribution.ztl returns a string like :

"JANE DOE;JOHN DOE; MIKE TYSON;"

It filters well the datasource but if the string contains character like ( or ) (and maybe more cases), it throws error, for example

"JANE DOE;JOHN DOE (THE ONE); MIKE TYSON;"

is resulting in

Input "JANE DOE;JOHN DOE (THE ONE); MIKE TYSON;" for Name has an invalid format

I wonder why and I can't find anything related to special character in the documentation.

What could be the workaround ?

It seems like for this case I forced to use setFilterExt method and not setFilter, am I right ?

I am using DS1.4.

Br,

Vincent

Accepted Solutions (1)

Accepted Solutions (1)

Karol-K
Advisor
Advisor
0 Kudos

Hi Vincent,

the filterExt method is expecting input string as it is also available in variable dialog or filter dialog (also exact same string like in BEx). This string will be parsed, I assume the "()" characters are breaking the parsing rules.

For first try, check if the string with escaped characters is fitting.

means,

     JANE DOE;JOHN DOE \(THE ONE\); MIKE TYSON;

if not, I have to spend more time on this topic (which I will do..)

Karol


vincentdechandon
Contributor
0 Kudos

Yes it's working by putting \ in front of special characters.

I'll put a control on my side, thanks !

Br,

Vincent

0 Kudos

how to give \ infront of special characters i have an input paper (other). if i give convert.repaleceall(paper(other),'('.'\(') its showing error \ is not allowed use \t or \n or \b. i have tried them but its not filtering to paper(other)

vincentdechandon
Contributor
0 Kudos

You are trying to do this from a javascript file right?

Or directly from a script dialog within Design Studio?

What is the "convert" object?

Br,

Vincent

0 Kudos

not using JavaScript file, directly in script dialog within design studio!!. I am getting the data filtered correctly but sill getting error saying its in invalid format."convert" object can be  used to convert one format to other in design studio . check by ctrl+space to get  availabe functions for convert method.. 

Answers (0)