cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Batrisyia_
Helper I
Helper I

How to display result based on a condition

I have a task to list down all the alternative materials based on the user input. Alternative materials depends on the temperature. For example, when user input is 60, then the alternative materials should display the materials that is higher than 60. All information obtained from excel document.

Is there any way on how to code this?

5 REPLIES 5
eka24
Super User III
Super User III

The information you have provided is not detailed enough. But assuming you have 2 input fields, InputB and InputA.

 

When you input 60 in InputA field, use the following formula on the fill property as a validation;

If(Value(InputA.Text)< Value(InputB.Text), Red,white)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

ganeshsanap
Super User
Super User

@Batrisyia_ As per my understanding you want to filter the excel data based on user input. let's say you are storing the user input in varUserInput variable. Then you can filter your data using below formula:

 

Filter(ExcelDataSource, Temperature > varUserInput)

 

Assuming you have Temperature field in your excel data source. Then you can pass this filtered data to your control where you are showing alternative materials.

ReferenceFilter, Search, and LookUp functions in Power Apps 

Additional InformationFilter on Excel Datasource (NonStatic) that has >500 records 


Please click Accept as solution if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

 

@eka24 

Based on first picture, when user choose 60 in 'max operating temperature, the alternative materials should display the material for 70,90,100,120 and 200 (in order). The third picture is the data.

 

Batrisyia__0-1604382597207.png     Batrisyia__1-1604382711838.png 

Batrisyia__3-1604383118200.png

 

 

 

 

I see that materials field is a Textbox. You wan to display all the material for 70,90,100,120 and 200 if the user selects a 60 in the same Textbox?

 

I suggest materials field should be a dropdown not a Textbox unless am misunderstood your request. 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24 

the alternative materials field is a list box. So, when user choose 60 in 'max operating temperature (dropdown)', it will display the material for 60 in 'suitable material (listbox1)' and at the same time the materials for the other temperature will display in 'alternative material (listbox2)'. 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

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 the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (40,027)