
Announcements
Hi All,
I'm a little in over my head at the moment and am looking for help:
I'm trying to integrate an approval matrix into my PowerApp, but cannot figure out how to get a ComboBox to filter a Person column based on a text column in the same table, where the criteria for the text column is being pulled by filtering another SharepointList. Once the ComboBox is filled out, I'd like to Patch the DisplayName to another Sharepoint list after clicking a button. Is this possible or am I asking PowerApps of too much?
My two SharePoint lists are below:
ContractTypes
| Division | Contract | Reviewer1 | Reviewer2 | Reviewer3 |
| Div1 | ContractType1 | Attorney | Director | |
| Div1 | ContractType2 | Attorney | Director | Accountant |
| Div2 | ContractType1 | Attorney | Director | |
| Div2 | Contract Type2 | Attorney | Director | |
| Div3 | ContractType1 | Attorney | Director | |
| Div3 | ContractType2 | Attorney | Director | Accountant |
ApproverChoices
| Department | Position | Person |
| Legal | Attorney | Legal Person #1 |
| Legal | Attorney | Legal Person #2 |
| Manufacturing | Director | Director #1 |
| Logistics | Director | Director #2 |
| Finance | Accountant | Accountant #1 |
| Finance | Sr. Accountant | Accountant #2 |
A user selects a Division from the Dropdown: Items = Distinct(ContractTypes, Divison)
and a Contract from the ComboBox: Items = Distinct(ContractTypes, Contract)
I'd like to add 3 separate ComboBoxes to lookup the value in the ContractTypes.ReviewerX columns based on the selections above and show the people in ApproverChoices.Person where Position = ReviewerX.
For example, if the: dropdown = Div3 and ComboBox1 = ContractType2
ComboBox1 would show all DisplayNames where ApproverChoices.Position = Attorney (Legal Person #1 and Legal Person #2)
ComboBox2 would show all DisplayNames where ApproverChoices.Position = Director (Director #1 and Director #2)
ComboBox3 would show all DisplayNames where ApproverChoices.Position = Accountant (Accountant #1)
Once I get this figured out, I'd like to users make a selection in each of the ComboBoxes above, and click on the Submit button and the Sharepoint List to Patch each of the selected DisplayNames to a SharepointList column in a 3rd SharepointList.
Hi @pinkydink
Here
Box1
If(!IsBlank(LookUp(ContractTypes, Division = Combo1.Selected.Value And Contract = Combo2.Selected.Value).Reviewer1),
Filter(ApproverChoices, Position = LookUp(ContractTypes, Division = Combo1.Selected.Value And Contract = Combo2.Selected.Value).Reviewer1)
)
Box2
If(!IsBlank(LookUp(ContractTypes, Division = Combo1.Selected.Value And Contract = Combo2.Selected.Value).Reviewer2),
Filter(ApproverChoices, Position = LookUp(ContractTypes, Division = Combo1.Selected.Value And Contract = Combo2.Selected.Value).Reviewer2)
)
Box3
If(!IsBlank(LookUp(ContractTypes, Division = Combo1.Selected.Value And Contract = Combo2.Selected.Value).Reviewer3),
Filter(ApproverChoices, Position = LookUp(ContractTypes, Division = Combo1.Selected.Value And Contract = Combo2.Selected.Value).Reviewer3)
)
Dont forget to bind to the right Column or Change the Filter to end in .DisplayName
Add in your box names.
As for patching once they selected Just use box.Selected.Value or .Person.DisplayName depends on your bindings and columns
If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others
Cheers
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey