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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Default Selected Value...
Power Apps
Unanswered

Default Selected Value for ComboBox to be a SharePoint Value

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have 3 ComboBoxes that are dependent. ComboBox 2 is dependent on CombBox1. ComboBox 3 is dependent on ComboBox2. All is good with ComboBox1 and ComboBox2. ComboBox 3 shows the correct items, but when the form is patched or is returned to in "Edit Mode" it resets to blank, not the value selected originally. I want ComboBox3 to have the "Default Selected Value" property to be a value from SharePoint based its ID. The details about my ComboBoxes are below. 

 

ComboBox1:

Items: Choices('Field Test Requests NEW'.Engineer)

DefaultSelectedItem: Parent.Default

 

ComboBox2:

Items: Sort(ShowColumns(Filter('Field Test Requests NEW',Engineer.DisplayName=DataCardValue91.Selected.DisplayName),"Name"),Name,Ascending)

DefaultSelectedItem: First(Filter(ShowColumns(Filter('Field Test Requests NEW',Engineer.DisplayName=DataCardValue91.Selected.DisplayName),"Name"),Name=ThisItem.ProjectNameStore))

 

ComboBox3:

Items: Sort(ShowColumns(Filter('Field Test Requests NEW_Accounts',FT_ID=TextInput1.Text),"AccountName"),AccountName,Ascending) 

DefaultSelectedItem: ??????

 

Thanks for the help!

Categories:
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you mean that your combo box3 default value will be blank when you back to the edit form?

    Could you tell me:

    1)the relationship between combo box1,combo box2, combo box3

    2)the controls' meaning in your formula: DataCardValue91,ProjectNameStore,TextInput1?

    3)how do you relate combobox2 and combobox3? In your formula, combo box3 only relates to TextInput1.

    4)what do you exactly mean about "when the form is patched or is returned to in "Edit Mode"? please describe the steps in details.

     

    If combo box3 and combo box2 principle is the same, you just need to set it defaultselecteditems like combo box2.

    Like this:

    First(ShowColumns(Filter('Field Test Requests NEW_Accounts',FT_ID=TextInput1.Text,AccountName=)))

     

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    1)

    This is for a project tracking system. The engineer, project, and customer are being pulled from 2 sharepoint lists. Engineer and project are from 'Field Test Requests NEW' and the customers come from 'Field Test Requests NEW_Accounts'. The customers are linked to their respective projects using an FT_ID. The following are what the ComboBoxes are used for. 

     

    ComboBox1: the engineer for the project

    ComboBox2: based on the engineer selected, only their projects appear

    ComboBox3: based on the project selected, only the customers for those project appear

     

    2) 

    DataCardValue91: datacardvalue from ComboBox1 for the engineer 

    DataCardValue95: datacardvalue from ComboBox2 for the project

    ComboBox3: datacardvalue from ComboBox3 for the customer

    ProjectNameStore: the column name in my sharepoint list for storing the project name

    TextInput1: where the FT_ID from 'Field Test Requests NEW' and 'Field Test Requests NEW_Accounts'

     

    3)

    The selection from ComboBox2 prompts TextInput1 to load the FT_ID for that project. Then based on that FT_ID, the customers from 'Field Test Requests NEW_Accounts' appear in ComboBox3 

     

    4)

    My ComboBoxes work great when you create a new form. I then use a Patch to submit the data to my SharePoint list, which also saves it correctly. The problem I have is when a user wants to go back in and edit a form they already closed out. OnEdit I already have a collection being made called EditFormCollection. EditFormCollection is populated by the row values based on the ID from that form. EditFormCollection has all columns, including the value that should be selected in ComboBox3 OnEdit. 

     

    5)

    I tried using: 

    First(ShowColumns(Filter('Field Test Requests NEW_Accounts', FT_ID=TextInput1.Text, AccountName=ComboBox3)))

    This gave me an error which says: Invalid number of arguments: received 1, expected 2 or more

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard