cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pealpy
Level: Powered On

¿How can I find or filter a document number and date of birth?

The application connects to SQL server and I do not know how to filter this numeric data.

 

SortByColumns(Search('[dbo].[datos]'; box1.Text; "CI";"Fecha"); "CI"; If(SortDescending1; Descending; Ascending))

 

"Fecha" is date

"CI" is int

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: ¿How can I find or filter a document number and date of birth?

As you noticed, Search only works for text columns. For other types of column, you can use the Filter function, with which you can use other operators, like in the example below.

SortByColumns(
    Filter(
        '[dbo].[datos]';
        CI = Value(box1.Text) Or Fecha = DateValue(box1.Text));
    "CI";
    If(SortDescending1; Descending; Ascending))

View solution in original post

1 REPLY 1
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: ¿How can I find or filter a document number and date of birth?

As you noticed, Search only works for text columns. For other types of column, you can use the Filter function, with which you can use other operators, like in the example below.

SortByColumns(
    Filter(
        '[dbo].[datos]';
        CI = Value(box1.Text) Or Fecha = DateValue(box1.Text));
    "CI";
    If(SortDescending1; Descending; Ascending))

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,168)