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 / Dynamically update dro...
Power Apps
Answered

Dynamically update dropdown value based on another dropdown value

(0) ShareShare
ReportReport
Posted on by 237

 

Hi Community Team,

 

I created canvas app and data source is sharepoint list. SharePoint list contains title,email,project-lookup,task-lookup columns.

In canvas app added two dropdowns i.e Project,Task.

       My Requirement is based on project dropdown dynamically show task dropdown.

How can achieve this requirement. Kindly provide correct approach of this requirement.

 

Thanks in advance.....!

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Powerappsuser11,

    Do you want to filter task based on selected project?

     

    If both are LookUp fields, please set the Project drodpown as:

    Choices(List.Project)

    Set Task dropdown Items as:

    Ungroup(Filter(list, Project.Value=dropdown_Project.Selected.Value).Task,"Task")

     

  • Powerappsuser11 Profile Picture
    237 on at

    Hi @v-qiaqi-msft 

     

    Thanks for early response.

        Above code implemented  but getting below error.

    I have SharePoint list i.e Time sheet. In that list columns are Project--lookup ,project task-lookup

    In canvas App added dropdown for project and project task. My requirement is based on selection of project update project task dropdown.

     

    Powerappsuser11_0-1690359253566.png

     

     

    Kindly help me for this requirement.

     

    Thanks in advance...!

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Powerappsuser11,

    Please do check my reply one more time, you have written a wrong formula.

    I wrote the following Choices() function with a dot instead of a comma.

    Choices(List.Project) 

     

  • Powerappsuser11 Profile Picture
    237 on at

     

    Hi @v-qiaqi-msft 

     

    Project dropdown is working but struck in project task dropdown

    Powerappsuser11_0-1690362388297.png

     

     Can you explain the below code details means sharepoint list, columns   in below code

    Ungroup(Filter(list, Project.Value=dropdown_Project.Selected.Value).Task,"Task")

     

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi

    Try this 

    You can use the Distinct function to retrieve unique project values from the SharePoint list.

    // Set the Items property of the project dropdown Items: Distinct('YourSharePointList', Project)

    // Set the Items property of the task dropdown Items: Filter('YourSharePointList', Project = DropdownProject.Selected.Value).Task

    Reference link : Create a dependent drop-down list in a canvas app - Power Apps | Microsoft Learn


    Thanks!

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.


  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Powerappsuser11,

    I think you have referred to a wrong column name.

    The Task is the LookUp column you populate the Project task with.

    Show me the specific error message.

     

  • Powerappsuser11 Profile Picture
    237 on at

    Hi @v-qiaqi-msft ,

     In sharepoint I have Project,Project Task,Timesheet lists.

    In Time sheet list columns are  Title, Project Task Name-lookup, Project Name-lookup.

    In canvas app screen added two dropdowns

    i) Dropdown1-Project Name --->Items--->Choices(Timesheet.'Project Name')

    ii) Dropdown2-Project Task Name---->Items---->

    Ungroup(Filter(Timesheet,'Project Name'.Value=Dropdown1.Selected.Value).ProjectTask Name,"ProjectTask Name"))

    Getting below error.

    Powerappsuser11_0-1690372770460.png

     Please resolve the issue.

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Powerappsuser11,

    The error message I mean is the specific error needing you hovering over the red line.

    The current info could not help me investigate it in detail.

     

    I want to clarify to you that column name reference is very important, you need to find out the real column name in your data source.

    So far, the column names you provide are inconsistent, I have no way to confirm the real column names in your data source, and this may be fatal to the syntax of the expression.

     

    Further, if you have this second LookUp column name as ProjectTask Name, I think you must refer to it as 'ProjectTask Name':

    Ungroup(Filter(Timesheet,'Project Name'.Value=Dropdown1.Selected.Value).'ProjectTask Name',"ProjectTask Name"))

    You must use a pair of '' when your column name have space within.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard