web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populating a default s...
Power Apps
Unanswered

Populating a default selected value based upon an if statement

(0) ShareShare
ReportReport
Posted on by 106

Hi, 

 

I am building a canvas app. I have a "final total" field that is a choice column (1,2,3,4,5,etc) in my SharePoint list. I am trying to get the default selected items of this field at the very end of the process to populate based upon several managers responses. For example, if the first manager concurs with the employees point value they have entered and then the next manager up also concurs with the employee then the default result of the field/combo box should be the employees value. So, say an employee goes in and says they want 3 points, manager A says yes, I concur with that, manager B also says yes, I concur with that, but manager C says no I only want them to have 2 points, then the final point value would be 2, not 3. I am trying to write up an if statement for this as each manager has the ability to concur with the employee or to only partially concur and enter their own value. 

 

This is the code I have currently in the default selected items - 

If(BranchManagerApprove.Text = "Concur with Employee"|| DivisionManagerApprove.Text="Concur with Branch Manager"|| DeptManagerApprove.Text="Concur with Division Manager",EmployeeCont.SelectedItems, BranchManagerApprove.Text= "Partially Concur"||DivisionManagerApprove.Text= "Concur with Branch Manager"||DeptManagerApprove.Text="Concur with Division Manager",BMPtConcur.SelectedItems
 
The first portion of this works correctly, if all managers concur with the employees value, then it populates correctly, but the second if statement isn't working as it should. It still populates just what the employee has put, not the value manager 1 has put. Any tips on why that is? I am going to continue building more and more logic into this. 
Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at

    hey @kat7777777 

     

    can u try this in your combobox defaultselecteditems property please:

    DefaultSelectedItems property of your 'final total' ComboBox:
    
    If(
     DeptManagerApprove.Text = "Concur with Division Manager",
     DivisionManagerPoints, 
     If(
     DivisionManagerApprove.Text = "Concur with Branch Manager",
     BranchManagerPoints, 
     If(
     BranchManagerApprove.Text = "Concur with Employee",
     EmployeePoints,
     BranchManagerPoints 
     )
     )
    )
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard