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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show only active records
Power Apps
Answered

Show only active records

(0) ShareShare
ReportReport
Posted on by 62

Hi All,

 

I have a basic mileage app with 2 tables, tblVehicles and tblMileageLogs, when you go to the form to log vehicle mileage against a vehicle, you go on a drop down within a form and select the vehicle you want. However it shows both active and none active vechicle because the forumula is Choices([@tblMileageLogs].'Vehicle Reg') within that drop down so it would do.

 

However i only want the choices of that dropdown to show only the active vehicles only. (The field type is a YES/No (true/false) within a sharepoint list for active within tblVehicles. 

 

I have put some images to help what i am tryign to achieve.

 

Form.PNG

tblmileagelogs.PNG

Vehicle Reg in mileage logs is a sharepoint lookup column if you need to know that but i also have it as a text column called Vehicle Reg BI. dont know if you needed to know this part 🙂

tblVehicles.PNG

Hope you can help me.

 

 

Categories:
I have the same question (0)
  • Verified answer
    NPPlatform Profile Picture
    606 Moderator on at

    Hi @MWads44 , you don't need to use the function Choices(). Try something like:

     

    ShowColumns(Filter(tblVehicles, Active = true),[name of column you want to show])

    When you add the comma after "true)" Power Apps will give you the available columns that you can choose from to show in the drop down.

     

    Hopefully this fixed your problem!

  • MWads44 Profile Picture
    62 on at

    @NPPlatform 

    Not showing any of my column names after the comma?

     

    error.PNG

  • NPPlatform Profile Picture
    606 Moderator on at

    @MWads44 One of those probably is your column name, but it's the internal Sharepoint-name. If you want to know the difference, read this article: https://www.sharepointdiary.com/2011/06/sharepoint-field-display-name-vs-internal-name.html

    The easiest way to see what the internal name is, is by sorting the Sharepoint list on the column 'Vehicle Reg'. It will append something like &sortField=LinkTitle to the url. In this example, LinkTitle would be your internal column name. That is what you would need to insert in my code after "true),". This article also explains how to find the internal name: https://www.sharepointdiary.com/2021/01/get-field-internal-name-in-sharepoint-online-using-powershell.html

     

    Alternatively, you can try out all the suggestions Power Apps gives you to find the column you are looking for. Let me know if this works for you!

  • MWads44 Profile Picture
    62 on at

    Sorted thanks @NPPlatform 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard