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 got rid of the error message by updating the forumula to:
If(DcdAssetTypeV.Selected.Value ="IT Asset",(Filter(Choices(CAPEX.'Approval 1'),DisplayName="John Doe")))
but it did not input the name into the field. The field is staying blank.
You have to put something in there to tell it DisplayName I think...Let me play around with it a minute and I will get back with you.
I am sure that should show the correct name but test it and make sure when you submit that it actually stores that field.
If it doesn't you may have to put a similar if statement on the Update Value for the card that holds that combo box. I can't remember if it needs both or just one.
The formula works to put the name there but it is not saving the name. Upon save the field is blank. I have put the code on both the DefaultSelected Items and the data cards update but the value is not getting saved to the list.
Okay...the update part is a little more tricky...I don't remember having to do all this before but seems you do. You have to tell it all the fields for the update so:
Claims:"i:0#.f|membership|" & Lower("firstname.lastname@example.org"),
** DataCardValue8 being the combo box that is the people field so that if it isn't "IT Asset" it will put what they select.
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!
Check out new user group experience and if you are a leader please create your group
Next call is happening on April 21st at 8a PST.
May the fourth be with you, join us online!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.