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 / How to make a field po...
Power Apps
Answered

How to make a field populate a item based on a drop down selection.

(0) ShareShare
ReportReport
Posted on by 91

Hello,

I have a basic power app that I’m trying to create in the form of a simple vehicle log book system. It is structured as follows-

 

2x SP lists

-LogBookTest (contains multiple columns where the app writes the data to)

-Vehicles (contains two columns, Rego and Make – (LogBookTest looks up from here to get the vehicles as it changes regularly)

 

My issue is made up of two questions-

 

  1. When in the ā€˜New Entry’ screen, I have a drop down list to select what vehicle the user is currently driving
    In the Vehicle list under the ā€˜make’ column, I have the description of the vehicle. My question is, when the user selects a certain vehicle from the drop down, how can I make another field show what type of vehicle that is?

Refer Screenshot 1

 

2. Again, in my ā€˜New Entry’ screen in pwr apps, I have a field for the ā€˜Start Odometer’
Is it possible/how can I make this field auto fill with the last odometer entry relevant to that vehicle from the LogBookTest list, so the user does not have to fill it in each time?
Is this some kind of lookup function to my LogBookTest list and how to point it to the last entry and not just another previous entry of that vehicle?

 

Appreciate any help or advice

 

Thanks

 

Screenshot 1.jpg

Screenshot 2.JPG

Screenshot 3.JPG

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,679 Most Valuable Professional on at

    Hi @GordoPwrApp ,

    For the first one, (xxxx is the valid output of your combo box)

    LookUp(
     Vehicles,
     Rego = YourDropDown.Selected.xxxx
    ).Make

    Second one assuming you want the Start Odometer of the last entry for the vehicle

    Lookup(
     Sort(
     LogBookTest,
     ID,
     Descending
     ),
     RegNoField = YourDropDown.Selected.xxxx
    ).'Start Odometer'

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • GordoPwrApp Profile Picture
    91 on at

    Hi @WarrenBelz ,

    Thanks for your reply.

     

    Your first solution worked in the following format - 

    LookUp(
    Vehicles,
    Title = DataCardValue18.Selected.Value
    ).Make

    'Title' being the rego column. of my list.

     

    The second solution I have not managed to get working. I think I have some confusion over what the 'RegNoField' is - what do you mean by this?

    Is the 'xxxx is the valid output of your combo box' always going to be '.Value'?

     

    Also, I want the 'End Odometer' from the list to populate the 'Start Odometer'

    See screen shot with highlighted areas.

    Screnshot.jpg

     

    Thanks again for you help.

  • WarrenBelz Profile Picture
    155,679 Most Valuable Professional on at

    Hi @GordoPwrApp ,

    It is whatever field you are trying to match the vehicle in the list with the one you are selecting in the drop-down.

     I have simply sorted the list in reverse order, so the Lookup picks up the first (actually the last/newest) matching record and then displays the 'End Odometer' field. The output of drop-downs is not always .Value. If you look at the end of the blog section of mine you will see examples.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • GordoPwrApp Profile Picture
    91 on at

    Thanks @WarrenBelz ,

    I understand that I am trying to match the 'End Odometer' from the vehicle that is selected, but then how do I put that in the 'Start Odometer' box?

     

    The way I read it is,

    1. I am telling it to look up the LogBookTest list,

    2. The ID of each item and in descending order.

    3. It looks at the 'End Odometer' column which should then be put into my 'Start Odometer' field based on the vehicle I look up from DataCardValue18

    snip.JPG

    I think I'm typing my formula wrong still-

     

    Lookup(Sort(LogBookTest,ID,Descending),EndOdometer=DataCardValue18.Selected.Value).'End Odometer'

     

    snip.JPG
  • Verified answer
    WarrenBelz Profile Picture
    155,679 Most Valuable Professional on at

    @GordoPwrApp ,

    As I noted - you need to match the Vehicle (this could be Title as you noted) as this is what is displayed in the drop-down

    LookUp(
     Sort(
     LogBookTest,
     ID,
     Descending
     ),
     Vehicle = DataCardValue18.Selected.Value
    ).'End Odometer'

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • GordoPwrApp Profile Picture
    91 on at

    Thanks @WarrenBelz .

    I have it all working now - was just missing the .Value after vehicle-

     

    LookUp(
    Sort(
    VehicleLogBook,
    ID,
    Descending
    ),
    Vehicle.Value = DataCardValue47.Selected.Value
    ).'End Odometer'

     

    Thanks for your help.

  • WarrenBelz Profile Picture
    155,679 Most Valuable Professional on at

    @GordoPwrApp ,

    Yes - if Vehicle is a Choice or Lookup field (you did not mention this), you need .Value

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard