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 filter column
Power Apps
Answered

How to filter column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

On SharePoint list I have a lookup column for in the timesheet list that collects contract no from another list called Contracts, the issue is there's over 5000 items. On Powerapps I am trying to see if I can filter the field to only show active contract no's but I'm unsure on how to go about it. 

Categories:
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Anonymous 

    YOu can use like below.

    Filter(DataUserCollection,IsLiked=true)



    VijayTailor_0-1601049785306.png

     

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

    Please Vote for my idea if you feel, that will help you in the future or good to have in power app.
    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Ability-s-to-Select-Icon-from-UIFabric/idi-p/694921

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Preview-Mode-for-All-the-Device-Like-Phone-Tablet-Vertical/idi-p/694891

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you mean that:
    1)you have a lookup field which looks up to contract no in Contracts list?

    2)you want to filter this lookup field to only display active contract?

    Could you tell me the data type of the field that records status of contract in Contracts list?

    I assume that this field is named status and its data type is Choice.

    If so, actually your key point is to avoid delegation.

    Since Choices() function is not delegate, so I do not suggest you use this common solution to set lookup field.

    You could set like this:

    1)if you use form to update this lookup field

    set the combo box's Items:

    Filter(Contracts,status.Value="active")

    set this field datacard's Update:

    {Value:DataCardValue5.Selected.'contract no',Id:DataCardValue5.Selected.ID}
    //DataCardValue5 is this combo box name

     2)if you use patch to update this lookup field

    set the combo box's Items:

     

    Filter(Contracts,status.Value="active")

     

    Patch function should be like this:

     

    Patch(...,....,
     {lookupfieldname:
     {Value:DataCardValue5.Selected.'contract no',Id:DataCardValue5.Selected.ID},
     ...
     }
     )
    //DataCardValue5 is this combo box name

     

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-yutliu-msft Just tested it now and it seems I still have the delegation warning, I clicked on a contract number and submitted it but can't view it on the detailed screen. Why is that and how can I fix it. 

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you show me 

    1)formulas in the combo box's Items, DefaultSelectedItems?

    2)formulas in this field's datacard Default?

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-yutliu-msft Attached is the formula for Items and Defaultselecteditems for the combobox.  Companycontracts is the list where the contractno are stored in and to check whether its active is from another column called "completed" and within that column the data type is a choice field so you pick between 0-1 and if 0 is chosen then the contract number is active. That's the reason to the formula used in the items formula box for the combo box.

    Screenshot (9).pngScreenshot (11).png

     

    Below is the Default settings for the datacard

    Screenshot (10).png

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Anonymous ,

    As i understood from the below your last comment.

    you want to set the DefalutSectedvalue for the Dropdown.

    but in can see the second Screenshot mention by you, there you set the Default properties for Datacard but instead of DataCard use the same formula for Combobox - DefaultSelectedPropeties like [ThisItem.FiledName]. that way. 
    Hope This will work for you.

    Thanks,
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @VijayTailor I tried that and that still doesn't work, the selected value isn't being displayed when submitted.

  • Vijay Tailor Profile Picture
    2,961 on at
    Hi what is the Error. it will be gr8 if you attach screenshot of your Issue
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     @v-yutliu-msft    @VijayTailor As you can see on the edit screen the contract number picked isn't being displayed as well as the in the view screen (last image)

    Screenshot (68).pngScreenshot (66).png

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Anonymous 

    Basically, you are selecting the Value in Screen 1 and expecting the value in screen 2 (Like Edit).
    For that purpose what you can do is .

    On click of button, you can set the variable and use that variable you want to see the selected value.

    for set the value you can use like below code- 

    Set(SelectedValueFromCB,ComboBox1.Selected.Value);
    
    and Use the "SelectedValueFromCB" value where you want to display this value.


    Thanks,


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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard