cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chiranjay
Helper II
Helper II

SharePoint List Item Filtering According To Another List Item With PowerApps

Please refer to the below details for the issue that I'm looking for a solution to.

  1. I have two SharePoint Lists A. Client Info - This list is customised using Microsoft PowerApps.

     I.   Title
     II.  Requestor
     III. Country
     IV.  States
     

    B. Country VS States

     I.   Title
     II.  Country
     III. State
     IV.  Postal Code
     
  2. I want to populate the 'Client Info - States column' using the 'Country VS States - State' column.

  3. In order to get it done, I have linked the 'Country VS States' list to 'Client Info'. I have done this using PowerApps's 'Add Data' - Data connection option.

The data connection works fine and the 'States' field in the 'Client Info' list (List 01), is populated with all the 'States' that are available in the 'Country VS States' (List 02).

  1. What I would like to have is if a user selects a 'Country' from 'Client Info', then the user should see only the states that belong to that country. Please see the below example formula.

    If(List01.Country==List02.Country) Then List01.States=List02.State

I can't understand how to give this formula in the 'PowerApps Formula Bar'.

I have used Microsoft InfoPath 2013 in SharePoint 2013 using Rules to do the same thing.

Please let me know your solutions.

Kind regards,
Chiranthaka

1 ACCEPTED SOLUTION

Accepted Solutions

@chiranjay ,

As I posted - the Items of cmbStates would be (assuming the output of cmbCountry here)

Filter(
   'Country VS States',
   Country = cmbCountry.Selected.Country
).State

 

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

 

View solution in original post

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @chiranjay ,

You did not say how the user was selecting the Country, but a list of States belonging to the selection would be

Filter(
   'Country VS States',
   Country = YourSelectedCountry
).State

 

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

WarrenBelz
Super User
Super User

Hi @chiranjay ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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

Thanks, @WarrenBelz for the tip. However I have added more info below. Please refer to them and kindly show me how to resolve my issue.

 

The country will be selected using a combo box named 'DataCard16' --> 'cmbCountry' and the filetred 'states' should be populated in 'DataCardValue17' --> 'cmbStates'.

 

Regards,
Chiranthaka

Thanks, @WarrenBelz for the tip. However I have added more info below. Please refer to them and kindly show me how to resolve my issue.

 

The country will be selected using a combo box named 'DataCard16' --> 'cmbCountry' and the filetred 'states' should be populated in 'DataCardValue17' --> 'cmbStates'.


Regards,
Chiranthaka

Thanks, @WarrenBelz for the tip. However I have added more info below. Please refer to them and kindly show me how to resolve my issue.

 

The country will be selected using a combo box named 'DataCard16' --> 'cmbCountry' and the filetred 'states' should be populated in 'DataCardValue17' --> 'cmbStates'.


Regards,
Chiranthaka

@chiranjay ,

As I posted - the Items of cmbStates would be (assuming the output of cmbCountry here)

Filter(
   'Country VS States',
   Country = cmbCountry.Selected.Country
).State

 

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

 

WarrenBelz
Super User
Super User

Hi @chiranjay ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,763)