I have 2 SharePoint Lists
Tbl-medicin (id, Medicin)
Tbl-Lager (Id, Borger, Medicin)
I would like to use 2 dropdowns
DropDown1.borger from Lager Distinct
and in DropDown2 match medicin from tbl-lager with tbl-medicin and display the medicin that is not in tbl-lager for that borger i selected in dropdown1
I have created this Distinct(Filter so far
Distinct(Filter('Tbl-Lager', borger = Dropdown2_2.Selected.borger),Medicin)
However how do i match that value of medicin in Tbl-Medicin ??
Please Help
Sorry i 'm new to PowerApps
Thanks
Solved! Go to Solution.
Hi
Try this in the second dropdown.
Filter('Tbl-Medicin',Not(Medicin in Distinct(Filter('Tbl-Lager', borger = Dropdown2_2.Selected.borger),Medicin)))
Note that the Not() formula is used for negation and not the '!' operator in most languages.
Hi @Mikroman ,
Have you considered putting the Borger field in the Medicin List - it would make the task much easier.
Hi
Yes it would, but that is not possible as the list will be used as selecting base, for medicin and then attacheded to borger in the other list.
This sort of goes in a circle - before I attempt any code, what are the Items of dropdown1?
DropDown1.borger from Lager Distinct
will be Borger
And in dropdown 2 will be medicin from tbl-lager where borger is match... but the dropdown must display which medicin from medicinlist there is not in the tbl-lager list for that borger, selected in dropdown1 and is my problem, how do i do that combination/compare between 2 lists in a dropdown
Here is my orginale item code
Distinct(Filter('Tbl-Lager', CPRNR = Dropdown2_2.Selected.CPRNR),Medicin)
And this is the code... i need to get match to medicin in medicinlist
Thanks
I need the Items of Dropdown2_2 - you have already supplied this one.
Filter('Tbl-Medicin', !(Medicin exactin 'Tbl-Lager'.'Medicin' && cprnr = Dropdown2_2.Selected.CPRNR))
Hi
This here gives me the difference between the 2 SharePointLists in Colum Medicin
Filter('Tbl-Medicin', !(Medicin exactin 'Tbl-Lager'.'Medicin'))
I need to see how i can add this here && borger = Dropdown2_2.Selected.Result into that filter.. So it also will match the borger in the Tbl-Lager, that will give the diffence between Tbl-Medicin and Tbl-Lager for that borger in Colum Medicin which exactly what i Need.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
192 | |
67 | |
46 | |
41 | |
22 |
User | Count |
---|---|
252 | |
122 | |
84 | |
80 | |
71 |