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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (20,220)