Hi team,
How to search either id or name using search bar in outsystems.
Thanks,
Akash Gunupudi
Text to identifier
TextToIdentifier()
Hi Akash,
Is this Search you're talking about?
If yes, then you can follow steps by steps how to use it.
For filter id or name you can add a filter in your aggregate like this: LongIntegerToText(IdentifierToLongInteger(Entity.Id)) like "%" + SearchText + "%" OR Entity.Name like "%" + SearchText + "%"
Regards,
Khuong
Please Check below links-
1. https://www.outsystems.com/help/servicestudio/9.0/Using_Data/aggregates/Filtering_Results.htm
2. https://www.youtube.com/watch?v=rFv2lu_sbmY
3. https://www.outsystems.com/forums/discussion/41870/mobile-search-bar/
You can put filter expression like below.
Employee.Name like "%" + Searchkeyword + "%" or Employee.Email like "%" + Searchkeyword + "%" or Employee.Phone like "%" + Searchkeyword + "%"
for exact match use = operator
for example: Employee.Id = Searchkeyword
Rahul
hii Rahul Kumar ,
I would like to know how to search number or name by using same search bar means
if i type id i has to give the name or if i type name i have to give the name with the same search bar
please give me that details
Hello Akash,
I have attached OML and working URL for you
https://akshayproject.outsystemscloud.com/YearSelector/Entity1s
for text change in record for id (1,2,3,4,5,6) check for search
Please check below expression you need to used that in the filter of aggregate
as suggested by Khuong Truong like operation not apply to the integer
so we are checking first the data putting is text or its integer and if integer checking on Id and if not checking on text
Hope this will helps you,
Thanks and Regards,
Akshay Deshpande
its not working
for result you need to give test value for that or directly try on your browser its working without test values
for text testing give validate property false
for id give validate property true
and in browser you will get easily just give search text or id there
Hi,
Simply you can use
(User.Id=TextToIdentifier(Search) ) or User.Name like "%"+Trim(Search)+"%"
hello amit,
I want to clear you that if its text and your converting from text to integer it will give you error
please check from your side that why I wrote that condition (earlier i was also thought similar condition but its not work at run time)
its working thanks...