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 / Can we filter SharePoi...
Power Apps
Unanswered

Can we filter SharePoint Lookup field based on a Yes/NO field

(0) ShareShare
ReportReport
Posted on by 3,506

I have 2 lists inside our SharePoint online site:-

 

1) Devices

 

2) MobileSubmissions

 

now the Devices has these fields:-

 

column2.png

 

and the MobileSubmission has a lookup field to the Devices list, as follow:-

 

coulumn3.png

 

now i created a new PowerApp Canvas and i defined the MobileSubmission as the source >> then inside the Canvase app i added a new form and i defined the MobileSubmission as the source >> now for the Lookup field, which have the following settings:-

 

column3.png

 

can i only show the Devices items which has IsAvailable  =Yes?instead of showing all the Devices's list items? thanks in advance for any help.

Categories:
I have the same question (0)
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @johnjohn123 

     

    Corrected One

     

    Filter(MobileSubmission,IsAvailable).Title

     

  • johnjohn123 Profile Picture
    3,506 on at

    @StalinPonnusamy  thanks for the reply,, but where i need to add this formula inside the Lookup's items?

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Yes, Set the Items property of the DevicesLookup (Combo Box) Which displays the available devices.

  • johnjohn123 Profile Picture
    3,506 on at

    @StalinPonnusamy  ok will try it and let you know who thing will work.. thanks

  • johnjohn123 Profile Picture
    3,506 on at

    @StalinPonnusamy  i tried the following:-

     

    thefilter.png

     

    but i got an error that Filter has some invalid arguments.. any advice?

  • johnjohn123 Profile Picture
    3,506 on at

    @StalinPonnusamy  i also tried the following:-

     

    isa.png

     

     

    where i did not get any error >> but when i submit the form the lookup field will not get populated... any advice?

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @johnjohn123

     

    1. Set the Combobox Items Property to

    Filter(Devices,IsAvailable)

     

    2. Set the field to Title for the combobox to display and search

    StalinPonnusamy_0-1631915906111.png

    3. On the Patch command

    Patch(
     MobileSubmissions,
     If(
     EditForm1.Mode = FormMode.New,
     Defaults(MobileSubmissions),
     LookUp(
     MobileSubmissions,
     ID = BrowseGallery1.Selected.ID
     )
     ),
     {
     Deviceslookup: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: Combobox1.Selected.ID,
     Value: Combobox1.Selected.Title
     }
     }
    )

     

  • johnjohn123 Profile Picture
    3,506 on at

    @StalinPonnusamy  but where i need to add the Patch command?can you advice more please?

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Patch command is OnSelect of "Save button"

     

    StalinPonnusamy_0-1631918539500.png

     

    It should Create or Update.

     

    Note: You may need to add other required fields (Like Title is required by default on SP List)

  • johnjohn123 Profile Picture
    3,506 on at

    @StalinPonnusamythe list i am planning to build will have around 50 fields, the current fields are just a sample .. so can i use the Patch field to update the lookup value only while the other fields to be updated by the submit form command?

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 380 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 340

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard