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 / Displaying based on Mu...
Power Apps
Answered

Displaying based on Mutiple Dropsown

(0) ShareShare
ReportReport
Posted on by 110

Hello,

 

I have a  SP List like

 

Location--- Work Type----- actions

 

NA------IMPROVEMENT------ACTION1

NA------IMPROVEMENT------ACTION2

NA------IMPROVEMENT------ACTION3

NA------IMPROVEMENT------ACTION4

 

So once user selects NA, IMPROVEMENT in Dropdown's i want the actions to be displayed in Mutiple rows...

 

ACTION1 (Text Fields)

ACTION2 (Text Fields)

ACTION3 (Text Fields)

ACTION4 (Text Fields)

 

any suggestions...

 

Categories:
  • R3dKap Profile Picture
    1,594 on at

    Hi @maruthi216,

    Are you trying to create a canvas screen where your have 2 dropdowns (one for Location and another for Work Type) and a gallery for showing the actions, and when you select a value from the Location and from the Work Type dropdown it shows in the gallery only the corresponding actions ?

    If so, here is what I suggest you do:

    • Add a dropdown list ddlLocation on your screen where Items = Choices(YourList.Location)
    • Add a dropdown list ddlWorkType on your screen where Items = Choices(YourList.WorkType)
    • Add a gallery on your screen and set the following as your datasource: Filter(YourList, Location.Value=ddlLocation.Selected.Value && WorkType.Value=ddlWorkType.Selected.Value)
    • Add a label inside the gallery and set its Text value to ThisItem.Actions

    That should do the trick. Otherwise do not hesitate to give us more information on what you're trying to acheive.

    Emmanuel

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @maruthi216 ,

    Could you please share a bit more about the Location column, Work Type column in your SP List? Are they choice type column or Single text type column?

    How do you want to display your action values in your app? Using Gallery control or Text Input box (Multiple line mode) or Label?

     

    Please take a try with the following workaround:4.JPG

    1. If the Location column, Work Type column are both choice type column:

    Set the Items property of the Location Dropdown box to following:

    Choices('YourSPList'.Location)

    Set the Items property of the Work Type Dropdown box to following:

    Choices('YourSPList'.'Work Type')

    Add a Text Input box in your app, set the Mode property to TextMode.MultiLine. Set the Default property to following:

    Concat(
     Filter('YourSPList', Location.Value = LocationDropbox.Selected.Value, 'Work Type'.Value = WorkTypeDropbox.Selected.Value),
     actions & Char(10)
    )

     

    2. If the Location column, Work Type column are both Text type column:

    Set the Items property of the Location Dropdown box to following:

    Distinct('YourSPList', Location)

    Set the Items property of the Work Type Dropdown box to following:

    Distinct('YourSPList', 'Work Type')

    Add a Text Input box in your app, set the Mode property to TextMode.MultiLine. Set the Default property to following:

    Concat(
     Filter('YourSPList', Location = LocationDropbox.Selected.Value, 'Work Type' = WorkTypeDropbox.Selected.Value),
     actions & Char(10)
    )

     

    In addition, if you want to display the actions value within a Gallery, please consider add a Gallery in your app, set the Items property to following:

    Filter('YourSPList', Location.Value = LocationDropbox.Selected.Value, 'Work Type'.Value = WorkTypeDropbox.Selected.Value)

    Add a Label within this Gallery, set the Text property to following:

    ThisItem.actions

     

    Best regards,

  • maruthi216 Profile Picture
    110 on at

    Attached is what i was looking for.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @maruthi216 

     

    In that case, you can use the expressions on individual text labels:
     
    TextInput1 -> Default -> First(Filter(ABC777, Region: Dropdown1.Selected.Value && worktype = Dropdown2.Selected.Value)).task
     
    TextInput2 -> Default -> Last(FirstN(Filter(ABC777, Region: Dropdown1.Selected.Value && worktype = Dropdown2.Selected.Value),2)).task
     
    TextInput3 -> Default -> Last(Filter(ABC777, Region: Dropdown1.Selected.Value && worktype = Dropdown2.Selected.Value)).task
     
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • maruthi216 Profile Picture
    110 on at

    i tried what you said but its only taking Task-1 and Task-3 which makes sense like First and Last, but its missing Task-2

    issue12.PNG
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @maruthi216 

     
    Can you try this expression on 2nd text input:
     Last(FirstN(Sort(Filter(ABC777, Region: Dropdown1.Selected.Value && worktype = Dropdown2.Selected.Value),task,Ascending),2)).task
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • maruthi216 Profile Picture
    110 on at

    it worked for one selection only, please see attached.

     

    But lets say i have 20 actions, how do i do that..? TASK-1,TASK-2,TASK-3............. TASK-20

    issue14.PNG
  • R3dKap Profile Picture
    1,594 on at

    Let's first rename your lists:

    • ABC111 to Regions
    • ABC444 to WorkTypes
    • ABC777 to Tasks
    • ABC888 to MyList

    In you form:

    • let's say your first datacard is the one for selecting a region. Let's say its combo box is called DataCardValue_Region
    • let's say your second datacard is the one for selecting a worktype. Let's say its combo box is called DataCardValue_WorkType
    • let's say your next datacards are the ones that should display the tasks. Let's say their respective text boxes are called DataCardValue_Task1, DataCardValue_Task2, DataCardValue_Task3, ...

    Now set the Text property of your DataCardValue_Task1 text input control to the following formula:

    Last(FirstN(Filter(Tasks,Region.Value=DataCardValue_Region.Selected.Value && WorkType.Value=DataCardValue_WorkType.Selected.Value),1))

    Put this formula in every DataCardValue_Task<N> text input controls and for each one change the number in red to be: 2, 3, ...

    Tell us if this works.

    Emmanuel

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @maruthi216 ,

    Could you please share a bit more about the Region and worktype column in your SP list? Are they Text type column or Choice type column?

     

    Based on the issue that you mentioned, I have made a test on my side, please take a try with the following workaround:

    Set the Default property of the Text Input1 to following:

    Last(
    FirstN(Filter(ABC777, Region = Dropdown1.Selected.Value && worktype = Dropdown2.Selected.Value), 1)
    ).task

    Set the Default property of the Text Input2 to following:

    Last(
    FirstN(Filter(ABC777, Region = Dropdown1.Selected.Value && worktype = Dropdown2.Selected.Value), 2)
    ).task

    Set the Default property of the Text Input3 to following:

    Last(
    FirstN(Filter(ABC777, Region = Dropdown1.Selected.Value && worktype = Dropdown2.Selected.Value), 3)
    ).task

    ...

    ...

    Set the Default property of the Text Input20 to following:

    Last(
    FirstN(Filter(ABC777, Region = Dropdown1.Selected.Value && worktype = Dropdown2.Selected.Value), 20)
    ).task

    Please consider take a try with above solution, check if the issue is solved.

     

    More details about the FirstN function, please check the following article:

    FirstN function

     

    Best regards,

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard