cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
biancadevera11
Regular Visitor

Predict dropdown value based on text input

Hi,

 

Is it possible to predict the dropdown value based on the input I enter on my textbox? For example, I entered iPad then the dropdown will show Apple. Then on another instance, I entered Surface, the dropdown value automatically sets to Microsoft. I should be able to modify the dropdown value if I want to. Currently working on canvas.

 

Thanks in advance!

5 REPLIES 5
StalinPonnusamy
Community Champion
Community Champion

Hi @biancadevera11 

 

Yes, that's possible. So set the Items property of Dropdown to

With({_Item: Lower(Trim(DeviceInput.Text))},
If(
    _Item = "ipad" || _Item = "iphone" || _Item = "mac",
    ["Apple"],
    If(
        _Item = "surface" || _Item = "windows",
        ["Microsoft"],
        [""]
    )
))

 

StalinPonnusamy_0-1633873199899.png

 

 

Note:  This hardcoded code is good for smaller lists. A good option is to get those values from the Database for a large list of devices.

StalinPonnusamy
Community Champion
Community Champion

Hi @biancadevera11 


Please let us know if anything needs on your post. We can help with this.

Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

Thanks,
Stalin - Learn To Illuminate

biancadevera11
Regular Visitor

@StalinPonnusamy how can I call it from a SharePoint list? For example, I have ProductsList with Brand and Products as columns.

StalinPonnusamy
Community Champion
Community Champion

Hi @biancadevera11 

 

Set the Items property of Dropdown to

Distinct(ProductsList, Product)

 

Set Default property of Dropdown to

LookUp(ProductsList, Brand=DeviceInput.Text).Product

 

StalinPonnusamy_1-1634776677562.png

 

SP Setup

StalinPonnusamy_0-1634776648184.png

 

StalinPonnusamy
Community Champion
Community Champion

Hi @biancadevera11 


Please let us know if anything needs on your post. We can help with this.

Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,749)