UserReponse filtering works fine for single objects.
If you run a query and have a prompt to ask the user to choose a city and they choose Manchester then the string for UserReponse is just “Manchester”. If you have info for Manchester in your table that you are filtering then it will filter it.
If you run a query and have a prompt to ask the user to choose more than on city and they choose London and Manchester then the string for UserReponse is “London;Manchester”. If you have info for Manchester or London in your table that you are filtering then it will not filter it because it is trying to filter for a single city called London;Manchester.
You have to look at other ways of getting the not in list working which will vary depending upon your requirements.
You could restrict the results at the query panel level by using the results from another query functionality for example.
I count with that UserResponse return format “London;Manchester” however i hope i can format it to “London”;“Manchester” before i put this result to inList. (somewhere i found a sample how i can do it, but didn’t try it)
somethink like this:
Inlist(FormatText(UserResponse(“Prompt”)))
So i have
=[Organizacna jednotka - filter - text] Where ([Organizacna jednotka - filter - key] InList (UserResponse(“Organizacna jednotka:”)) )
Unfortunatelly when i clik on validate still getting syntax error “Missing list element in ‘UserResponse’ at position 107. (IES 10068)” position 107 where tag UserResponse start. This error i got no mather how much variable is in prompt.
Seems that InList() support only literal parameters, not a funcion (Atleast for me, maybe i am wrong :).
The result of the UserResponse() function is one single string. Even though, a user entered more values in a prompt, the function still gives you all these values as a 1 string. You can’t turn it into more values, depending on how many values a user provided in a prompt.
Yes, you are right, this statement work
=[Organizacna jednotka - filter - text] Where ([Organizacna jednotka - filter - key] InList (“50002612”;“50002613”;“50002611” )
So there is two issues
how to force UserResponse(“prompt”) return string “50002612”;“50002613”;“50002611” instead of “50002612;50002613;50002611”
how to put Function as parameter into InList
Unfortunatelly i thing niether of them can be solved.
So, let’s dirty hand, is it possible to write my own function, what i can use in Webi ? (Version 4.0)
//Edit: Marek i found your older topic about userlib so i think it is possible, thanks!
//Edit2: Corrected statement
The prompt in the report is used to limit values of a universe object. Why don’t you use this object for the calculation instead of the UserResponse() function?