I am working on making a time reporting app where the idea is that workers will be able to report their daily working hours linked to a specific project. The datasource that the dropdown should collect data from is a list in Sharepoint that is called "Projectlist" and the value that must be displayed comes from the field "Title". So far I manage to retrieve the data in the drop down menu. But, I want to filter so that the only projects the worker can choose from in the drop down menu are the projects with the status "Yes" from the field "Active" and only those projects that are assigned to the userId from the field "ProjectManager".
Solved! Go to Solution.
Hi
DropDown.Items = Distinct(DS, Field).
DS can always be filtered using FILTER.
1. DropDown. Items = Distinct(Projectlist, Title).
- this show dropdown of Title from Projectlist
2. Modify the DS to
Filter(Projectlist, Active = "Yes" && ProjectManager = userid)
3. Finally, DropDown.Items = Distinct(Filter(Projectlist, Active = "Yes" && ProjectManager = userid), Title)
Hope this helps if I understand your fields correctly.
TQ
Hi
DropDown.Items = Distinct(DS, Field).
DS can always be filtered using FILTER.
1. DropDown. Items = Distinct(Projectlist, Title).
- this show dropdown of Title from Projectlist
2. Modify the DS to
Filter(Projectlist, Active = "Yes" && ProjectManager = userid)
3. Finally, DropDown.Items = Distinct(Filter(Projectlist, Active = "Yes" && ProjectManager = userid), Title)
Hope this helps if I understand your fields correctly.
TQ
Thx, I understand the formula you have made. But, I still can not make it work. I am OK on step one, but once I start using the filter it does not work.
Hi
It is OK. Maybe my explanation and example is not user-friendly.
May you share with me your sample database and I will write exactly to solve it out, if you are OK!
TQ
OK, what e-mail address to share to?
I am not able to share outside the organisation.
Hi
Understood.
I can't really do much unless you make a sample table here, and put it here for me to simulate for you.
Thanks
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |