Question


Atos Syntel
IN
Last activity: 27 Jan 2017 6:49 EST
How to ignore case while comparing strings in obj-browse method
My requirement is to ignore case while comparing field and value in obj-browse method, so i decided to convert both of them to upper case using toUpper function, but when i try to do, i get the error that the only exposed properties can be used in where clause, but the property used for comparison is an exposed property, anyone knows how to achieve this.


PEG
IN
pyUserIdentifier property is not exposed. That's the reason Obj-Browse was throwing error when you try to use in where clause.
Can you try with any of the existing exposed property in Obj-Browse to understand the difference?


Atos Syntel
IN
pyUserIdentifier is an exposed column, i tried with pzinskey and got the same response.
if i enter the property without the toUpper function in the field box it is working, i think pega is assuming it as an entirely different property when we put it in toUpper function.


Coforge Ltd
GB
Hi,
Please try to use property-set like below.
[email protected](.pyUserIdentifier)
[email protected](.pyUserIdentifier)
Then in next step use the above properties in obj-browse like below.
.pyUserIdentifier isEqual Param.UserID
Thanks,
Venkat.


Accenture
NL
Hi DilipanV9591,
You only need to send the comparison value in uppercase. The error is displayed as on left hand side you have added a function before the property where as only property reference needs to be provided.


PEG
IN
Hi Dilipan,
I did try the use case in 7.2.1 local instance and getting the same issue if I use toUpperCase function.
Looks like it is treated as a different property as said by you.
I did try executing query directly in database(MSSQL) and was able to get the result for following.
select * from prpc721data.pr_operators where PYUSERIDENTIFIER='XXXXX';
select * from prpc721data.pr_operators where pyUserIdentifier='XXXXX';


Wipro Ltd
IN
Have you tried equalsignorecase string expression from expression builder?


Atos Syntel
IN
equalsignorecase will not satisfy my requirement
Accepted Solution


OCBC Bank
MY
Hi Dilipan,
Agreeing with sumit kumar.
I don't think we can use functions in the left hand side of select fields for obj-browse method. It allows only for right hand side.
Thanks,
Prudhvi


Atos Syntel
IN
So Obj-browse cannot form a query like below,
select ******** from pr_operators where upper(pyuseridentifier) IN ('xxxxx','xxxxx','xxxxx');
I use oracle database, it is case sensitive.


Atos Syntel
IN
Can someone please confirm this?
Obj-browse cannot form a query like below,
select ******** from pr_operators where upper(pyuseridentifier) IN ('xxxxx','xxxxx','xxxxx');


OCBC Bank
MY
Hi Dilipan,
I have performed your scenario in my local oracle DB and it is appearing as below.
I don't find any difference in both the queries at my end. Can you please try your scenario without upper function.
Please let us know the parameters used in IN function of your query or provide sample records of your table.
Thanks and Regards,
Prudhvi.


Atos Syntel
IN
we can form the queries in the Database directly, but can you form it using (the first query in your screenshot) obj-browse method in pega ?