This content has been marked as final. Show 7 replies
In the case of dynamic where clause, we always start the indexing from the next number.
Suppose if your View Object contain :1, then on the dynamic where clause you will always append next value, which will be :2 and so on.
Yes, we do write that when we are sure about the numbers..but in my case, some times user can put 1 value, so my index will be 2, but the moment user selects a second field, my index will fail.
I have to check wht fields user selects, take d count, and based on that i gotta assign index, that can be 1 way, but wanted to cnfrm, if any other generic method is there to do this..
If you don't wish to use positional parameter, I think you can go with Named Parameters and then use setNamedWhereClauseParam in VO. This way you need not worry about existing position parameter index. I haven't used this, so not sure of any impacts. Refer to the JDev guide to understand the named parameters and possible issues.
I din't find anything like 'setNamedWhereClauseParam' in jdev guide. In some of the forums it is said, setNamedWhereClauseParam is applicable to adf and not oaf. Am not sure how much that is authentic.
If anyone has any working code in oaf, it will be very much helpful.
I am stuck with it as with different search options, it is taking different value.
Use the following code snippet to add where clause
String s = "xyz="+vXYZ;
Using a variable (vXYZ: value that you want as filter) in string definition would save you to have a named bind parameter and still be able to add the additional bind parameter. This should work.