cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Search/Filter/Lookup

I need tour help.I have 3 columns on Excel sheet. The first column has to start number, example: 1. Second column has final number example: 10. The third colomn has one Text, example: New York. I would like one fórmula on App, if I text one number between 1 and 10, example 1, 2 ,3,4,6,6,7,8,9 or 10, result the word " New York.". I tried, Lookup, Filter and Search but It didn't work.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Search/Filter/Lookup

@Larussa 

Seems there's a data type mis-match  ... somewhere. Try this

LookUp(
       IMPORTACAONEW;
       Value(CEPInicial) <= Value(Label9.Text)&&
       Value(CEPFinal) >= Value(Label9.Text);
       DirecaoTriagem
)

 

 

 

View solution in original post

7 REPLIES 7
Highlighted
Super User II
Super User II

Re: Search/Filter/Lookup

@Larussa 

Add a TextInput control to your app and call it NumInput.

 

Then add a label to your app and set this as the Text property

LookUp(yourExcelTableName, Start<=Value(NumInput.Text) && End>=Value(NumInput.Text),Text)

Note:

- your Excel table must be a Table in Excel

- Column headings of your table are; 'Start', 'End' and 'Text'

- replace 'yourExcelTableName' with the name of your source/Excel table 

Highlighted
Community Support
Community Support

Re: Search/Filter/Lookup

Hi @Larussa :

I'm not quite sure what your request is. The following is my guess. If there is an error, please point it out.

Case1:You have a text input box,and if you input a number between 1 and 10,then filter the records whose third colomn is "New York".

If so,try this code:

 

IF(Value(TextInput1.Text)<=10 && Value(TextInput1.Text)>=1,Filter(yourdatasource,'The third colomn'="New York"))

 

Case2:You want to update the "third colomn" value of the record in the data source with the value of "Second column" between 1 and 10 to "New York"

If so,try this code:

 

UpdateIf(yourdatesource,'Second column'<=10 && 'Second column'>=10,{'The third colomn':"New York"})

 

If the above two cases do not meet your requirements, could you describe your requirements in detail and provide your code and screenshots?

I think these links will help you a lot:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-update-updateif

Best Regards,

Bof

Highlighted
New Member

Re: Search/Filter/Lookup

Thanks a lot @Eelman , but it unforunately it didn't work. It's my formula: 

 

LookUp(IMPORTACAONEW;CEPInicial<=Value(Label9.Text)&&CEPFinal>=Value(Label9.Text);DirecaoTriagem)

 

error message: invalid argument, expected numeric value

 

 

Highlighted
New Member

Re: Search/Filter/Lookup

 

Thanks you @v-bofeng-msft, but It did't work.

 

it's my fomula:

If(Value(Label9.Text)<=Cepfinal && Value(Label9.Text)>=Cepinicial;Filter(IMPORTACAONEW;'The third colomn'="DirecaoTriagem"))

 

invalid argument, expected text.

Highlighted
Super User II
Super User II

Re: Search/Filter/Lookup

@Larussa 

Seems there's a data type mis-match  ... somewhere. Try this

LookUp(
       IMPORTACAONEW;
       Value(CEPInicial) <= Value(Label9.Text)&&
       Value(CEPFinal) >= Value(Label9.Text);
       DirecaoTriagem
)

 

 

 

View solution in original post

Highlighted
New Member

Re: Search/Filter/Lookup

Congratulations @Eelman 

 

It's work very well

 

Thanks you

Highlighted
New Member

Re: Search/Filter/Lookup

Great job!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,325)