I have a Sharepoint column (B) in a list (List2) referencing another column (A) in another list (List1). In List2 column B, I need it to show every distinct value of column A via dropdown menu for users to select from. So far using the distinct function I have just gotten errors.
Solved! Go to Solution.
@colbyc
I believe I was just missing the .Result in my previous code. This will work if Column A is a single-line text type (not a Choices type).
Distinct('List 1', 'Column A').Result
---
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."
How are you referencing ListB from ListA? Is it a single-line text column? Or is it a lookup? (I am hoping for text). I know how to do this and can help you out.
If you provide some sample data I'm happy to use your column names in the solution.
---
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 watch this video!! This is an excellent video that talks about distinct function.
https://www.youtube.com/watch?v=Ap3_Ea9H8b0&ab_channel=ShaneYoung
______________________________
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
It is via a lookup column. Would this be easier to reference via a singleline text field?
Sample Data:
If List 1 Column A looks like:
Column A |
AA |
BB |
BB |
CC |
CC |
CC |
List 2, Column B's drop down options should be:
Column B |
AA |
BB |
CC |
@colbyc
Yes, if you use a single-line text column you can take the 'lazy' way of doing it and put this DISTINCT code in the Items property of the dropdown.
Distinct('List 1', 'Column A')
The output will show in the dropdown menu like this:
Result |
AA |
BB |
CC |
---
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."
Does a single line of text have an Items property? I am not seeing one. Also though (and this mistake might have altered your response), I reversed Column/List names between my intial post and my first response to you. I've edited above posts to make them all match.
I'm not seeing a dropdown though for that field in PowerApps. Its just a text box. In the properties menu (after clicking on the textbox of field) Items is not an option.
@colbyc
It might be helpful to share a screenshot of your app. I'm not certain what we are dealing with here. I thought it was a dropdown 🙂
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
256 | |
254 | |
83 | |
40 | |
30 |
User | Count |
---|---|
311 | |
265 | |
122 | |
65 | |
48 |