Powerapps is linked to a SharePoint Online list
Combo box 1: Asset Type (2 options): IT Asset, Non IT Asset
If this box is set to "IT Asset" I need it to:
Combo Box 2: 1st level Approver ( 9 options): IT Director, Manager, Local Controller, General Manager, Field Controller, Regional Controller, CFO, CEO, BoD: This needs to be set to first option (IT Director) and gray out (disable)
Combo Box3: Approval (Person Field from SharePoint); Set to name of IT director and gray out (disable)
Any and all assistance to accomplish this would be helpful!
Solved! Go to Solution.
I finally got this working:
Combo box 1: Set OnSelect to: Set(varAssetType,ComboBox1.Selected.Value)
Combo box 2: Set DefaultSelectedItems to: f(ComboBox1.Selected.Value ="IT Asset",(Filter(Choices(ListName.ComboBox2),Value="IT Director")))
Combo box 3: Set DefaultSelectedItems to: If(ComboBox1.Selected.Value ="IT Asset",
Then on the DisplayMode of both the data cards for Combo Box 2 and Combo Box 3 to: If(ComboBox1.Selected.Value ="IT Asset",Disabled,Edit)
Hopefully this can help someone else!
You would just use an If statement for this...
So..if you want it to default the value on Combo Box 2 off Combo Box 1 then the Default Value for Combox box 2 would be = If(ComboBox1.Selected.Value="IT Asset","IT Director") -- this will say if they select IT Asset for ComboBox1 then make the Default for Combo Box 2 "IT Director"
You would do the same If statement with a variation for making it disabled...
If(ComboBox1.Selected.Value="IT Asset",Disabled, Edit) -- This would go on the DisplayMode for ComboBox 2
Just make sure to remember that when you put a default for a combo box it goes on the DefaultSelectedItems....not the regular Default
@rebeccas I would like this as a solution but your default formula is not working "The property expects Record values but this rule produces incompatible text values." there is no else part of this statement.
If(ComboBox1.Selected.Value= "IT Asset","IT Director") if it is false I would like it to be blank but I cannot seem to get it in the formula.
Okay, sorry...it is because I told you wrong it isn't working...I had to go pull up one of my old ones to get it right...thought I could right off...but I was wrong.
If(ComboBox1.Selected.Value="IT Asset", (Filter(Choices(SPListName.Column2Name),Value="IT Director")))
You don't have to tell it anything special to make it blank if not...it will be. Let me know if this doesn't work for you.
I got this working on Combo box 1 and 2 but how do I get this working on combo box 3 (person field from sharepoint)? I want it to, If IT Asset, default the people combo box to user John doe. Any thoughts on how to do this?
Thanks for your quick assistance!
So, I think it would be this:
If(ComboBox1.Selected.Value="IT Asset", (Filter(Choices(SPListName.PeopleColumn),Value="John Doe")))
If that doesn't work let me know and I will click over and test it to see what needs to be different but I think it is right.
Here is an image of my screen: When combox box 2 (1st level Approver) is set to It director I want to Approval Name field below to be set to "John Doe" and be grayed out.
If(DcdAssetTypeV.Selected.Value ="IT Asset",(Filter(Choices(CAPEX.'1stApprover'),Value="John Doe")))
This did not work and when I changed the column to the people column (Approval1 which is different from 1stApprover) the formula errors out.
Check out new user group experience and if you are a leader please create your group
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks