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 / How to Control Combobo...
Power Apps
Unanswered

How to Control Combobox and Dropdown in a New Row in a Gallery

(0) ShareShare
ReportReport
Posted on by 43

Hello!

 

I have an embedded canvas app set up to mimic an excel sheet where users can add new rows and edit existing ones. It pretty much functions as needed with two exceptions, and I'm not sure how to tackle them.

 

1. I need the Milestone Status dropdown when a new row is added to default to Active. I did figured out how to get SOMETHING to show up by setting the AllowEmptySelection to false, but whatever shows up seems to be based off of whatever status is the first row.

 

2. I need the Associated Project combobox when a new row is added to show up as whatever project the user is currently in. In the example below, I have navigated to the canvas app via the project Test 2.  It is correct for the existing rows to be whatever they are, in this case Test 1, but when a new item is added, it should look to the context and grab that project, in this case Test 2. Currently it defaults to nothing. 

 

 

sjd889_0-1671140782750.png

 

 

Any help is appreciated!

 

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @sjd889 ,

     

    For both of your questions you can use the Default property of the controls:

     

    1. 

    Coalesce(ThisItem.'Milestone Status',"Active")

     2.

    Coalesce(ThisItem.'Associated Project', XYZ)

    You'll have to replace XYZ with a reference to the value/record for the selected project.

  • sjd889 Profile Picture
    43 on at

    Thanks for the response! Just tried the first one really quick and Coalesce(ThisItem.'Milestone Status', "Active") leads to an error saying it was expecting an OptionSetValue but received a Text value instead. How do I correct that?

  • sjd889 Profile Picture
    43 on at

    Okay! Was able to get it by changing it to Coalesce(Text(ThisItem.'Milestone Status'), "Active").

     

    Still not clear on what to add to the formula for the second one. Currently in DefaultSelectedItems I have:

     

    LookUp(
    colProject,
    Project = ThisItem.'Associated Project'.Project

     

    So I imagine

    Coalesce(

    LookUp(
    colProject,
    Project = ThisItem.'Associated Project'.Project), ????)

     

    But not sure what to put there because how does it know which project the user is currently in? This needs to be dynamic and not just me telling it a project name the way I am telling it a status in the other scenario.

     

  • sjd889 Profile Picture
    43 on at

    Okay! I figured out that I needed to enable the ModelDrivenFormIntegration to get the context. I was able to get the contextual project name with the code ModelDrivenFormIntegration.Item.'Project Name' which is awesome, and I am putting it into the coalesce with the lookup statement I know works for pulling the list of project options and it's cranky because the lookup statement is a record value and the modeldrivenformintegration piece is text.

     

    Any ideas on how to adjust this to make the comparision valid?

     

    Coalesce(LookUp(
    colProject,
    Project = ThisItem.'Associated Project'.Project),
    ModelDrivenFormIntegration.Item.'Project Name')

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @sjd889 ,

     

    I can imagine it will look something like the below:

     

    Coalesce(
     ThisItem.'Associated Project',
     LookUp(
     colProject,
     Project = ModelDrivenFormIntegration.Item.'Project Name'
     )
    )

     

    Both arguments should return a record.

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 739 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 268

Last 30 days Overall leaderboard