web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using part off a text ...
Power Apps
Answered

Using part off a text field to determine default values of drop-down fields.

(0) ShareShare
ReportReport
Posted on by 40

Hello all,

 

I have a question I hope someone can solve. 

I have a TextInput field that I want to use the auto-fill dropdown fields. 

 

This is the situation: 

Project2021_1-1622727214919.png

 

Brand has the items: "Apple" and "Samsung"

Model has the items: "iPhone" and "Galaxy"

Memory has the items: "32GB" , "64GB" and "128GB"

 

Now I want to get my default values based on the textinput above.

So if I fill in "Apple" I want the dropdown for brand to show the value "Apple".

And when I fill in "Apple iPhone", I want to get the brand value "Apple" and model value "iPhone" shown. 

And so on.

When the value I use in the textinput isn't present in one of the dropdowns then it can just use "1" as default. 

 

So I'm looking for something that search if part of the textinput matches one of the items in de dorpdowns. 

 

Can anyone help me? Thanks in advance!  

 

*EDIT: Maybe it's good to know that the order and values that can be in the text input are not pre determined. So I should also be able to only fill in the memory-value. Or I should be albe to first fill in the memory value and then the brand for example.

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    Hi, this should do it for the default of the dropdowns, just change 1 to 2 or 3 to get the second or third part of the string and set the TextInput1.Text to your control name

     

    Last(FirstN(Split(TextInput1.Text," "),1)).Result

  • Project2021 Profile Picture
    40 on at

    Thanks a lot, it works as you say!
    The only little problem I have is that I'm not sure in which order the users will fill in the field.
    So if they have a different order then I anticipate then it doesn't work anymore. 

    "Samsung Galaxy 128GB" works perfectly - "Galaxy Samsung 128GB" or "64GB Samsung Galaxy" doesn't work. 

    I can work with this solution, but if anyone knows a way to solve the problem above I would be graceful!

  • C-Papa Profile Picture
    1,836 on at

    I can't really see what the point of the text field is, just use the dropdowns and add all of your phones, models numbers and sizes to it and then the data is fixed in the input, so you know the order. At the minute you have two steps to get to one answer. 

  • Project2021 Profile Picture
    40 on at

    I understand what you mean. 

    The thing is to simplify my question I used a very small example of the total amount of data I'm gonna have. In the application I want to build there are many more brands, with I donnow how many models etc... 

     

    So for users that know exactly what they want it's easy if they can do a search based on one field. I also want users to only select a value that is in one of the dropdows. So eventually the values that are saved are the ones in the dropdows. I'm trying to increase the ease of which users can find the thing they are looking for.  It's purely to increase the speed of which users can find the item they want. 

     

    Maybe there is a better solution for it, but this is what I thought off. 

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Project2021 Put this in the default of the 1st dropdown and follow the same pattern for the other 2.

     

    LookUp(Split(Trim(TextInputSearch.Text), " "), Result in ["Apple","Samsung"]).Result

  • Project2021 Profile Picture
    40 on at

    Thanks, I got it to work!

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Project2021 Glad to help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard