cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ZDowning20
Regular Visitor

New to PowerApps I need help with displaying information based on a dropdown selection.

Hi All, 

 

I am building a checklist for my Team and I want it to display a list of software based on someones Job Role. 

 

I have 2 lists built out.

 

The first list is titled "RoleBasedGroups"

This list contain the list of job role groups we have in our organization.

 

Title

Accounting

Finance

Executive

HR

IT

 

The second list is Title Software and contains a list of software someone would need installed in that job role.

Title

Group

Adobe Acrobat Pro

Accounting

HR

IT

Citrix

Accounting

Finance

Executive

HR

IT

Microsoft Project

IT

Microsoft Visio

IT

HR

Finance

VPN

Executive

Finance

HR

IT

What I would like to do is have a drop-down where someone can select a specific role and then a list of software that role needs is displayed. I have been trying to figure this out for a while now.

 

In my drop-down I was told to leave the default value as "RoleBasedGroup.Title"

 

I've been looking for ways to then output the list of software based on the selection in the drop down.

 

For the life of me I am struggling to figure out what I need to do in order display the list of software in a text field.

12 REPLIES 12

Hi @ZDowning20 ,

Do you mean that Assigned Software field is a lookup field which allow multiple value in RoleBasedGroup?

If so, the formula is different.

1)If you use drop down to choose Title, you could only choose one Title a time and display Assigned Software of one Title.

Set drop down's Items:

RoleBasedGroup

set list box's Items:

Split(
    Concat(
       ForAll(
              Filter(RoleBasedGroup,Title=Dropdown1.Selected.Title),
              Concat('Assigned Software',Value&",")
              ),   
//you need to use forall to concat softwares one by one because of its multiple lookup data type
       Value&","   
           ),
//concat all the softwares
      ","
      )
//split them based on ","

 

2)If you use combo box to choose Title, you could only choose multiple Titles a time and display Assigned Software of multiple Titles.

Set combo box's Items:

 

RoleBasedGroup

 

set list box's Items:

 

Split(
    Concat(
       ForAll(
              Filter(RoleBasedGroup,Title in ComboBox1.SelectedItems.Title),
              Concat('Assigned Software',Value&",")
              ),   
//you need to use forall to concat softwares one by one because of its multiple lookup data type
       Value&","   
           ),
//concat all the softwares
      ","
      )
//split them based on ","

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yutliu-msft 

I have decided to go with the drop down.

 

I entered the formula you suggested for the listbox and I have 7 errors in it so far. I'm not sure what I did wrong on the formula.

 

I used Value&Char(10) because I want the software split by a new line not a ",".

Hi @ZDowning20 ,

Let me make sure something firstly:

RoleBasedGroup list

1)Title field(text type): job name

2)Assigned Software(lookup field allows multiple value): softwares

Do you want to

1)choose a job in a drop down, then display its related softwares in a list box?

2)update with the job and softwares value?

If so, I didn't show you how to change formula about updating.

Could you tell me whether you use Patch function or Submit function to update?

Try this:

1)if you update data use patch function

set the drop down's Items:

RoleBasedGroup

set drop down's Value:

Title

set list box's Items:

Dropdown1.Selected.'Assigned Software'          

The update formula:

Patch(RoleBasedGroup,Defaults(RoleBasedGroup),{Title:DropDown1.Selected.Title,'Assigned Software':Concat(Dropdown1.Selected.'Assigned Software',Value&",")})

 

2)if you update data use Submitform function

set the drop down's Items:

 

RoleBasedGroup

 

set drop down's Value:

 

Title

 

set list box's Items:

 

Dropdown1.Selected.'Assigned Software'          

 

Title datacard's Update:

Dropdown1.Selected.Value

'Assigned Software' datacard's Update:

Dropdown1.Selected.'Assigned Software'   

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,518)